alt+- will add <-
shift+ctrl+c to add # infront of a line
‘—-’ for a header, so it is easy to navigate through the script
command +shift + m for pipe %>% ctrl+alt+i for new code
chunk
Plain text
end a line with two spaces to start a new paragraph.
italics and italics * text * or _ text _ (without gap
*text*) bold and
bold ** text ** or __ text __ (without gap
**text**) superscript2
superscript^2^ ~strikethrough
link to rstudio ([text]
and without gap (paste link withhttp://) )
1==1 # equality
1!=3 # unequal
13<14 # 13 smaller than 14
14>13 # 14 bigger than 13
12>=0 # 12 greater or equal to zero
12<=3 # 12 smaller or equal to zero
family
name <- c("saneesh", "sanusha", "appu", "kishan")
weight <- c(63, 48, 20, NA)
height <- c(164, 150, NA, 75)
family <- data.frame(name, weight, height)
family %>%
as_tibble()
library(tidyverse)
data <- data.frame(sex = c(rep("female", 10), rep("male", 8)), score = c(rnorm(n = 10,
mean = 7.56, sd = 1.978), rnorm(n = 8, mean = 7.75, sd = 1.631)))
data %>%
head(5)
data %>%
group_by(sex) %>%
summarise(score = n()) %>%
mutate(freq = score/sum(score) * 100)
library(tidyverse)
years <- tribble(~Location, ~Year, ~Month, ~Day, ~Lenght, "Sydney", 2000, 9, 15,
12.1213, "Athens", 2004, 8, 13, 12.1212, "Beijing", 2008, 8, 8, 13.212, "London",
2012, 7, 27, 13.1212, "Rio de Janeiro", 2016, 8, 5, 65)
using knitr::kable()
| Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species |
|---|---|---|---|---|
| 6.3 | 3.3 | 6.0 | 2.5 | virginica |
| 6.3 | 2.9 | 5.6 | 1.8 | virginica |
| 6.3 | 2.7 | 4.9 | 1.8 | virginica |
| 6.3 | 2.8 | 5.1 | 1.5 | virginica |
| 6.3 | 3.4 | 5.6 | 2.4 | virginica |
| 6.3 | 2.5 | 5.0 | 1.9 | virginica |
# run previous code chunk
library(gt)
years %>%
gt()
| Location | Year | Month | Day | Lenght |
|---|---|---|---|---|
| Sydney | 2000 | 9 | 15 | 12.1213 |
| Athens | 2004 | 8 | 13 | 12.1212 |
| Beijing | 2008 | 8 | 8 | 13.2120 |
| London | 2012 | 7 | 27 | 13.1212 |
| Rio de Janeiro | 2016 | 8 | 5 | 65.0000 |
years %>%
mutate(Lenght = round(Lenght, 2)) %>%
gt() %>%
tab_options(column_labels.font.size = 11, column_labels.font.weight = "bold",
table.font.size = 10, ) %>%
opt_table_outline(style = "solid", width = px(2))
| Location | Year | Month | Day | Lenght |
|---|---|---|---|---|
| Sydney | 2000 | 9 | 15 | 12.12 |
| Athens | 2004 | 8 | 13 | 12.12 |
| Beijing | 2008 | 8 | 8 | 13.21 |
| London | 2012 | 7 | 27 | 13.12 |
| Rio de Janeiro | 2016 | 8 | 5 | 65.00 |
library(janitor)
##
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
data <- data.frame(HairEyeColor)
data %>%
tabyl(Hair, Eye) %>%
adorn_percentages("row") %>%
adorn_pct_formatting(digits = 2) %>%
adorn_ns() %>%
knitr::kable()
| Hair | Brown | Blue | Hazel | Green |
|---|---|---|---|---|
| Black | 25.00% (2) | 25.00% (2) | 25.00% (2) | 25.00% (2) |
| Brown | 25.00% (2) | 25.00% (2) | 25.00% (2) | 25.00% (2) |
| Red | 25.00% (2) | 25.00% (2) | 25.00% (2) | 25.00% (2) |
| Blond | 25.00% (2) | 25.00% (2) | 25.00% (2) | 25.00% (2) |
# identify location of NAs in vector
which(is.na(family))
## [1] 8 11
colSums(is.na(family))
## name weight height
## 0 1 1
mat <- matrix(sample(c(NA, 1:5), 50, replace = TRUE), 5)
df <- as.data.frame(mat)
df %>%
replace(is.na(.), 0) %>%
view()
see spread & gather
# install.packages('janitor')
library(janitor)
id <- (c(1, 1, 2, 2, 3, 3))
Country <- c("Angola", "Angola", "Botswana", "Botswana", "Zimbabwe", "Zimbabwe")
year <- c("2006", "2007", "2008", "2009", "2010", "2006")
bank.ratio <- c(24, 25, 38, 34, 42, 49)
Reserve.ratio <- c(77, 59, 64, 65, 57, 86)
broad.money <- c(163, 188, 317, 361, 150, 288)
bank <- data.frame(id, Country, year, bank.ratio, Reserve.ratio, broad.money)
bank %>%
view()
as_tibble()
## Warning: The `x` argument of `as_tibble()` can't be missing as of tibble 3.0.0.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
bank <- bank %>%
clean_names() # replaced . with _
glimpse(bank)
## Rows: 6
## Columns: 6
## $ id <dbl> 1, 1, 2, 2, 3, 3
## $ country <chr> "Angola", "Angola", "Botswana", "Botswana", "Zimbabwe", …
## $ year <chr> "2006", "2007", "2008", "2009", "2010", "2006"
## $ bank_ratio <dbl> 24, 25, 38, 34, 42, 49
## $ reserve_ratio <dbl> 77, 59, 64, 65, 57, 86
## $ broad_money <dbl> 163, 188, 317, 361, 150, 288
bank <- bank %>%
clean_names() # replaced . with _
filter bank data frame below such that it retains a country if a given id is satisfied e.g. filtering a data frame that has countries with id 1 and 2 only
bank %>%
filter(id %in% c(1, 2)) %>%
as_tibble()
summarise fund available with each countries
bank %>%
group_by(country) %>%
summarise(fund = sum(broad_money)) %>%
as_tibble()
column: new name= old name
iris %>%
rename(S.len = Sepal.Length, Sp. = Species) %>%
head(3)
iris %>%
rename_with(tolower) %>%
head(3)
iris %>%
select_at(vars(Species, Petal.Length), tolower) %>%
head(3)
library(tidyverse)
mtcars <- mtcars %>%
as_tibble(rownames = "cars")
library(tibble)
iris %>%
add_column(ob_no = 1:150) %>%
head(5)
iris %>%
as_tibble() %>%
head(3)
library(gapminder)
summary(gapminder)
## country continent year lifeExp
## Afghanistan: 12 Africa :624 Min. :1952 Min. :23.60
## Albania : 12 Americas:300 1st Qu.:1966 1st Qu.:48.20
## Algeria : 12 Asia :396 Median :1980 Median :60.71
## Angola : 12 Europe :360 Mean :1980 Mean :59.47
## Argentina : 12 Oceania : 24 3rd Qu.:1993 3rd Qu.:70.85
## Australia : 12 Max. :2007 Max. :82.60
## (Other) :1632
## pop gdpPercap
## Min. :6.001e+04 Min. : 241.2
## 1st Qu.:2.794e+06 1st Qu.: 1202.1
## Median :7.024e+06 Median : 3531.8
## Mean :2.960e+07 Mean : 7215.3
## 3rd Qu.:1.959e+07 3rd Qu.: 9325.5
## Max. :1.319e+09 Max. :113523.1
##
str(gapminder)
## tibble [1,704 × 6] (S3: tbl_df/tbl/data.frame)
## $ country : Factor w/ 142 levels "Afghanistan",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ continent: Factor w/ 5 levels "Africa","Americas",..: 3 3 3 3 3 3 3 3 3 3 ...
## $ year : int [1:1704] 1952 1957 1962 1967 1972 1977 1982 1987 1992 1997 ...
## $ lifeExp : num [1:1704] 28.8 30.3 32 34 36.1 ...
## $ pop : int [1:1704] 8425333 9240934 10267083 11537966 13079460 14880372 12881816 13867957 16317921 22227415 ...
## $ gdpPercap: num [1:1704] 779 821 853 836 740 ...
change name of observation— mutate (variable=recode (variable, ‘old name’=‘new name’)))
gapminder %>%
mutate(country = recode(country, India = "IND")) %>%
filter(country == "IND") %>%
head(3)
To convert all non-zero numeric values to “Yes” to convert zero values to “No”
df <- data.frame(name = c("saneesh", "sanusha", "appu", "jaru"), sex = c(2, 0, 5,
8))
df
# convert numeric values to 'Yes'
df %>%
mutate(sex1 = ifelse(sex != 0, "Yes", "No"))
df %>%
mutate(sex1 = ifelse(sex != 0, "Male", "Female"))
The ifelse() function is used to check whether each
value in the “sex” column is non-zero. If it is, the value is replaced
with “Yes”. If not, the value is replaced with “No”.
gapminder %>%
select(year, country, gdpPercap) %>%
head(3)
msleep %>%
select(starts_with("sleep")) %>%
head(3)
iris %>%
select(-Sepal.Length, -Species) %>%
head(3)
or
iris %>%
select(-c(Sepal.Length)) %>%
head(3)
iris %>%
select(!Sepal.Length) %>%
head(3)
ends_withiris %>%
select(ends_with("length")) %>%
head(3)
starts_withiris %>%
select(starts_with("Sepal")) %>%
head(3)
gapminder %>%
select(year, country, lifeExp) %>%
filter(country == "Eritrea", year > 1950) %>%
head(3)
gapminder %>%
filter(country == "Canada") %>%
head(3) # from gapminder data filter country Canada and show only 2 observations
gapminder %>%
filter(country != "Oman") %>%
head(3) # from gapminder data filter all the other countries except Oman
iris %>%
filter(Species != "setosa") %>%
glimpse()
## Rows: 100
## Columns: 5
## $ Sepal.Length <dbl> 7.0, 6.4, 6.9, 5.5, 6.5, 5.7, 6.3, 4.9, 6.6, 5.2, 5.0, 5.…
## $ Sepal.Width <dbl> 3.2, 3.2, 3.1, 2.3, 2.8, 2.8, 3.3, 2.4, 2.9, 2.7, 2.0, 3.…
## $ Petal.Length <dbl> 4.7, 4.5, 4.9, 4.0, 4.6, 4.5, 4.7, 3.3, 4.6, 3.9, 3.5, 4.…
## $ Petal.Width <dbl> 1.4, 1.5, 1.5, 1.3, 1.5, 1.3, 1.6, 1.0, 1.3, 1.4, 1.0, 1.…
## $ Species <fct> versicolor, versicolor, versicolor, versicolor, versicolo…
iris %>%
select(Species) %>%
distinct(Species) %>%
filter(Species %in% c("setosa", "versicolor")) %>%
head(3)
using a vector, save the names as a vector and give it to
%in%
target <- c("Hungary", "Iceland", "Mongolia")
gapminder %>%
filter(country %in% target) %>%
head(3)
friends <- data.frame(Names = c("Saneesh", "Appu", "Shruti", "Aradhana", "Arathi",
"James Bond"), age = c(40, 9, 25, 25, 25, 50))
# data frame is friends columns in friends are Names, Age, Height, etc. Column
# Name have 'Saneesh', 'Appu', 'Shruti', 'Aradhana', 'Arathi', 'James Bond' We
# want to filter information related to Sanees and James Bond only, so we
# created a vector with these names in it.
target <- c("Appu", "James Bond") #and then
friends %>%
filter(Names %in% target)
# or
friends %>%
filter(Names == "Appu" | Names == "James Bond")
# or
friends %>%
filter(Names %in% c("Appu", "James Bond"))
iris %>%
filter(!Species %in% c("setosa", "versicolor")) %>%
glimpse()
## Rows: 50
## Columns: 5
## $ Sepal.Length <dbl> 6.3, 5.8, 7.1, 6.3, 6.5, 7.6, 4.9, 7.3, 6.7, 7.2, 6.5, 6.…
## $ Sepal.Width <dbl> 3.3, 2.7, 3.0, 2.9, 3.0, 3.0, 2.5, 2.9, 2.5, 3.6, 3.2, 2.…
## $ Petal.Length <dbl> 6.0, 5.1, 5.9, 5.6, 5.8, 6.6, 4.5, 6.3, 5.8, 6.1, 5.1, 5.…
## $ Petal.Width <dbl> 2.5, 1.9, 2.1, 1.8, 2.2, 2.1, 1.7, 1.8, 1.8, 2.5, 2.0, 1.…
## $ Species <fct> virginica, virginica, virginica, virginica, virginica, vi…
iris %>%
filter(Petal.Width >= 2 & Petal.Width <= 5) %>%
glimpse()
## Rows: 29
## Columns: 5
## $ Sepal.Length <dbl> 6.3, 7.1, 6.5, 7.6, 7.2, 6.5, 6.8, 5.7, 5.8, 6.4, 7.7, 7.…
## $ Sepal.Width <dbl> 3.3, 3.0, 3.0, 3.0, 3.6, 3.2, 3.0, 2.5, 2.8, 3.2, 3.8, 2.…
## $ Petal.Length <dbl> 6.0, 5.9, 5.8, 6.6, 6.1, 5.1, 5.5, 5.0, 5.1, 5.3, 6.7, 6.…
## $ Petal.Width <dbl> 2.5, 2.1, 2.2, 2.1, 2.5, 2.0, 2.1, 2.0, 2.4, 2.3, 2.2, 2.…
## $ Species <fct> virginica, virginica, virginica, virginica, virginica, vi…
library(tidyverse)
mtcars <- mtcars %>%
rownames_to_column
mtcars %>%
filter(str_detect(rowname, "Merc")) %>%
head(3) # filter only 'Merc'
mtcars %>%
filter(!str_detect(rowname, "Merc")) %>%
head(3) # filter everything except 'Merc'
To remove or exclude all entries in the “name” column of your data
frame that have 1 in the “pref” column, you can use the
filter() and distinct() functions from the
dplyr
df <- data.frame(name = c("a", "a", "b", "c", "d", "a", "d"), pref = c(1, 2, 2, 1,
3, 4, 1))
df
df %>%
group_by(name) %>%
filter(!any(pref == 1)) %>%
ungroup()
or, if you have multiple rows with the same name but different values in the “pref” column, the code above will remove all rows with that name if any of them have 1 in the “pref” column. If you want to remove only the rows with 1 in the “pref” column, but keep the other rows with the same name, you can modify the code as follows:
df %>%
group_by(name) %>%
filter(!any(pref == 1)) %>%
ungroup()
iris %>%
pull(Species) %>%
head(3) # returns vector values
## [1] setosa setosa setosa
## Levels: setosa versicolor virginica
iris %>%
select(Species) %>%
head(3) # returns a table with one column
iris %>%
select(everything()) %>%
head(3)
gapminder %>%
filter(country == "Oman" & year > 1980 & year <= 2000) %>%
head(4)
gapminder %>%
select(country, year) %>%
filter(year >= 1980, country == "India" | country == "Oman" | country == "Canada") %>%
head(4)
gapminder %>%
filter(country != "Oman") %>%
head(3) # from gapminder data filter all the other countires exept Oman
gapminder %>%
select(-year, -pop) %>%
head(5)
gapminder %>%
filter(year == 2007) %>%
group_by(country) %>%
summarise(meanLE = mean(lifeExp)) %>%
arrange(meanLE, decreasing = TRUE) %>%
head(3)
gapminder %>%
group_by(country) %>%
summarise(minLE = min(lifeExp)) %>%
arrange(minLE, decreasing = FALSE) %>%
head(3)
grouped by continent, then summarise two things, first
n=n() number of rows in which each continent are or the
size of each group, then the mean of the mean of the lifeExp
variable.
gapminder %>%
group_by(continent) %>%
summarise(n = n(), meanLife = mean(lifeExp))
gapminder %>%
group_by(continent) %>%
summarise(PopConti = sum(pop))
pets <- data.frame(names = c(rep("saneesh", 3), rep("appu", 2), "sanusha"), pet = c(rep("dog",
3), rep("cat", 2), "tiger"), number = c(2, 2, 5, 7, 8, 1), size = c(rep("medium",
2), rep("small", 3), "big"))
pets
pets %>%
group_by(pet, size) %>%
summarise(totalpet = sum(number))
## `summarise()` has grouped output by 'pet'. You can override using the `.groups`
## argument.
If we want make a ‘new column’ with values from ‘number’ only if ‘sp.name’ ‘a’ or any other values has the following responses ‘young’ and ‘adult’, if not enter 0 in the ‘new column’.
You need to have groups with any of stage == “young” & “adult” (group level conditions) and stage == “adult” (row-level condition):
library(tidyverse)
plot <- c(rep(1, 2), rep(2, 4), rep(3, 3))
bird <- c("a", "b", "a", "b", "c", "d", "a", "b", "c")
area <- c(rep(10, 2), rep(5, 4), rep(15, 3))
birdlist <- data.frame(plot, bird, area)
birdlist
# summarize the following data frame to a summary table. option 1
birdlist %>%
group_by(plot) %>%
summarise(bird = n(), area = unique(area))
# option 2
birdlist %>%
count(plot, area, name = "bird")
gapminder %>%
summarise(mean(lifeExp))
gapminder %>%
summarise(range(lifeExp))
## Warning: Returning more (or less) than 1 row per `summarise()` group was deprecated in
## dplyr 1.1.0.
## ℹ Please use `reframe()` instead.
## ℹ When switching from `summarise()` to `reframe()`, remember that `reframe()`
## always returns an ungrouped data frame and adjust accordingly.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
gapminder %>%
filter(country == "India") %>%
group_by(country) %>%
summarise(GDPmax = max(gdpPercap), GDPmin = min(gdpPercap), GDPmean = mean(gdpPercap))
df <- data.frame(name = c("a", "a", "b", "c"), seedling = c(1, 0, 1, 0), adult = c(0,
5, 0, 1))
df_new <- df %>%
group_by(name) %>%
summarise(seedling = max(seedling, 0), adult = max(adult, 0)) %>%
ungroup()
iris %>%
count(Species, name = "how many")
mtcars %>%
count(am, name = "number") %>%
as_tibble()
mtcars %>%
count(gear, name = "no. gear")
plot <- c(rep(1, 2), rep(2, 4), rep(3, 3))
bird <- as.factor(c('a', 'b', 'a', 'b', 'c', 'd', 'a', 'b', 'c'))
area <- c(rep(10, 2), rep(5, 4), rep(15, 3))
birdlist <- data.frame(plot, bird, area)
birdlist
# birdlist %>% group_by(plot, area) %>% mutate(count(bird))
birdlist %>%
group_by(plot, area) %>%
dplyr::summarize(bird = n(), # when summarize doesn't work directly use it (dplyr::)like this
.groups = "drop") # to summarize of a column with reference to two other variables.
treatment <- c(rep("ab", 2), rep("bgrnf", 8), rep("bgpnf", 4))
site <- c("ab1", "ab2", rep("bgrnf1", 3), rep("bgrnf2", 2), "bgrnf3", "bgrnf4", "bgrnf5",
rep("bgpnf1", 2), rep("bgpnf2", 2))
data <- data.frame(treatment, site)
library(tidyverse)
# to find the site per each treatment
data %>%
group_by(treatment) %>%
count(treatment, name = "#sites")
year <- c(rep(2000, 4),
rep(2001, 4),
rep(2002, 4)
)
site <- c(rep('a', 3),
rep('b', 3),
rep('c', 3),
rep('d', 3)
)
fire <- c('yes', 'no', 'yes',
'yes', 'no', 'no',
'yes', 'yes', 'yes',
'yes', 'yes', 'yes')
df <- data.frame(year, site, fire)
df %>%
group_by(site) %>%
summarize(
Burnt_once = sum(fire == "yes" &
year %in% c(2000, 2001, 2002)) == 1, # in these years look for 1 'yes'
Burnt_twice = sum(fire == "yes" &
year %in% c(2000, 2001, 2002)) == 2, # in these years look for 2 'yes'
Burnt_thrice = sum(fire == "yes" &
year %in% c(2000, 2001, 2002)) == 3 # in these years look for 3 'yes'
) %>% # returns a logical vector
mutate(
Burnt_once = ifelse(Burnt_once, 1, 0),
Burnt_twice = ifelse(Burnt_twice, 1, 0),
Burnt_thrice = ifelse(Burnt_thrice, 1, 0)
) %>% # convert logical response to numeric
summarise( # summarise data
across( # specifycolumns
where(is.numeric), # select columns with numeric ones
~ sum( # selected column using the ~ formula notation
.x, # for each selected columns
na.rm = TRUE))) # remove any missing values before calculating the sum
library(dplyr)
library(stringr)
feedback <- c("good_book", "good_read", "for knowledge", "adventure")
book <- c("Ramayana", "Bible", "Encyclopedia", "Mbharatha")
df <- data.frame(book, feedback)
df %>%
mutate(response = case_when(str_starts(feedback, "good") ~ "good")) %>%
select(book, response) %>%
as_tibble()
text to columns
df <- data.frame(films = c("Spider_man", "James_bond", "Iron_man", "Bat_man"))
df
df1 <- df %>%
separate(films, c("a", "b"), sep = "([_])")
df1
df1 %>%
unite("names", a:b, remove = FALSE)
df1 <- data.frame(id = c(1:4), films = c("Spider_man", "James_bond", "Iron_man",
"Bat_man"))
df2 <- data.frame(id = c(1:4), country = rep("us", 4))
df3 <- left_join(df1, df2, by = "id")
We are making a wide format from long format in the first example. The second example is to make a long format from wide.
# the following is already in long format
classdata <- data.frame(
studentname = c('captian', 'ant', 'james', 'spider', 'tony', 'bat', 'wonder'),
sibject = c('math', 'his', 'math', 'geo', 'his', 'geo', 'math'),
grade = c('A+', 'B', 'B', 'A+', 'C', 'B+', 'C')
)
classdata %>% head()
wide.class <- spread(classdata, # name of the data frame
sibject, # new columns to be made
grade) # values to go into new columns
head(wide.class)
gather(wide.class, # name of the data frame
subject, # name of the column to put data into
grade, # name of the column to put value into
geo, his, math) %>% # from where values has to be gathered
drop_na()
bind rows
df1 <- data.frame(id = c(1:4), films = c("Spider_man", "James_bond", "Iron_man",
"Bat_man"))
df2 <- data.frame(id = c(5:8), films = c("King Cong", "Silence of the lambs", "Intersteller",
"Gravity"))
dplyr::bind_rows(df1, df2)
for multiple variables
library(tidyverse)
srno <- c(1:2)
film <- c("arabica", "robust")
rate <- c("good", "better")
lang_Eng <- c("yes", "yes")
films <- data.frame(srno, film, rate, lang_Eng)
str(films)
## 'data.frame': 2 obs. of 4 variables:
## $ srno : int 1 2
## $ film : chr "arabica" "robust"
## $ rate : chr "good" "better"
## $ lang_Eng: chr "yes" "yes"
films <- films %>%
mutate(across(c(rate, lang_Eng), as.factor))
str(films)
## 'data.frame': 2 obs. of 4 variables:
## $ srno : int 1 2
## $ film : chr "arabica" "robust"
## $ rate : Factor w/ 2 levels "better","good": 2 1
## $ lang_Eng: Factor w/ 1 level "yes": 1 1
select a key variable and everything or every other columns.
library(gapminder)
gapminder %>%
select(pop, everything()) %>%
head(3)
library(stringr)
data <- data.frame(Dose.Cm = c("d1", "D2", "D3"), Len.km = c("High", "low", "Low"))
glimpse(data)
## Rows: 3
## Columns: 2
## $ Dose.Cm <chr> "d1", "D2", "D3"
## $ Len.km <chr> "High", "low", "Low"
data %>%
mutate(Dose.Cm = tolower(Dose.Cm), Len.km = toupper(Len.km))
data <- data.frame(Dose.Cm = c("d1", "D2", "D3"), Len.km = c("high", "low", "medium"))
data <- data %>%
mutate(len = as.factor(Len.km))
glimpse(data)
## Rows: 3
## Columns: 3
## $ Dose.Cm <chr> "d1", "D2", "D3"
## $ Len.km <chr> "high", "low", "medium"
## $ len <fct> high, low, medium
data %>%
mutate(len = fct_relevel(len, c("low", "medium", "high")))
This drops any non-numeric characters before or after the first number. The grouping mark specified by the locale is ignored inside the number.
library(tidyverse)
class <- c("8th", "9th", "10th")
students <- c("25-30", "35-41", "21-28")
school <- data.frame(class, students)
school
glimpse(school) # notice students is a binned variable it is a not a numeric.
## Rows: 3
## Columns: 2
## $ class <chr> "8th", "9th", "10th"
## $ students <chr> "25-30", "35-41", "21-28"
school %>%
mutate(students = parse_number(students)) %>%
glimpse()
## Rows: 3
## Columns: 2
## $ class <chr> "8th", "9th", "10th"
## $ students <dbl> 25, 35, 21
school %>%
mutate(students = parse_number(students))
# now students because number with first value of the column
library(tidyverse)
rawdata <- data.frame(species_1 = rnorm(n = 40, mean = 300, sd = 18.5), species_2 = rnorm(40,
305, 16.7))
data <- pivot_longer(data = rawdata, cols = species_1:species_2, names_to = "species",
values_to = "weight")
library(tidyverse)
df <- data.frame(name = c("saneesh", "sanusha", "appu", "jaru"), fav.no = c(11, 7,
20, 21), animal = c("human", "human", "human", "dog"))
df %>%
pivot_wider(names_from = "animal", values_from = "fav.no")
# but when we have similar names in the grouping column
df1 <- data.frame(name = c("saneesh", "sanusha", "appu", "jaru", "saneesh"), fav.no = c(11,
7, 20, 21, 12), animal = c("human", "human", "human", "dog", "human"))
df1 %>%
pivot_wider(names_from = "animal", values_from = "fav.no")
## Warning: Values from `fav.no` are not uniquely identified; output will contain
## list-cols.
## • Use `values_fn = list` to suppress this warning.
## • Use `values_fn = {summary_fun}` to summarise duplicates.
## • Use the following dplyr code to identify duplicates.
## {data} %>%
## dplyr::group_by(name, animal) %>%
## dplyr::summarise(n = dplyr::n(), .groups = "drop") %>%
## dplyr::filter(n > 1L)
# because saneesh is repeated twice but with two fav.nos the solution is to add
# a row id, make pivot wide and get rid of the row id
df1 %>%
mutate(id = row_number()) %>%
group_by(name) %>%
pivot_wider(names_from = "animal", values_from = "fav.no", values_fill = 0) %>%
select(-id)
library(tidyverse)
numbers <- data.frame(test = seq(1:10))
numbers <- numbers %>%
mutate(test1 = as.numeric(cut_number(test, 3)))
numbers <- numbers %>%
mutate(test1 = as.factor(test1)) %>%
mutate(test2 = recode(test1, `1` = "low", `2` = "medium", `3` = "high"))
library(ggplot2)
ggplot(iris, aes(x = Petal.Length, y = Petal.Width, fill = Species), alpha = 0.07) +
geom_point(size = 4, shape = 21, color = "black", stroke = 1.5)
df <- data.frame(dose = c("D0.5", "D1", "D2"), len = c(4.2, 10, 29.5))
library(ggplot2)
# Basic barplot
p <- ggplot(data = df, aes(x = dose, y = len)) + geom_bar(stat = "identity")
p
# Horizontal bar plot p + coord_flip()
# Change the width of bars
ggplot(data = df, aes(x = dose, y = len)) + geom_bar(stat = "identity", width = 0.5)
# Change colors
ggplot(data = df, aes(x = dose, y = len)) + geom_bar(stat = "identity", color = "blue",
fill = "white")
# Minimal theme + blue fill color
p <- ggplot(data = df, aes(x = dose, y = len)) + geom_bar(stat = "identity", fill = "steelblue") +
theme_minimal()
p
# out side the bars
p + geom_text(aes(label = len), vjust = -0.3, size = 3.5) + theme_minimal()
p + geom_text(aes(label = len), vjust = 1.6, color = "white", size = 3.5) + theme_minimal()
df <- data.frame(dose = c("D0.5", "D1", "D2", "pp", "kk", "rr"), len = c(4.2, 10,
29.5, 12, 15, 23))
library(ggplot2)
ggplot(df, aes(len)) + geom_density() + geom_vline(aes(xintercept = mean(len)), col = "red",
linetype = "dashed")
library(ggplot2)
ggplot(iris, aes(Petal.Length, Petal.Width)) + geom_point() + geom_smooth(method = "lm")
## `geom_smooth()` using formula = 'y ~ x'
## raincloud plot
library(ggdist)
library(tidyverse)
library(tidyquant)
## Loading required package: PerformanceAnalytics
## Loading required package: xts
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
##
## Attaching package: 'xts'
## The following objects are masked from 'package:dplyr':
##
## first, last
##
## Attaching package: 'PerformanceAnalytics'
## The following object is masked from 'package:graphics':
##
## legend
## Loading required package: quantmod
## Loading required package: TTR
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
mpg %>% filter(cyl %in% c(4, 6, 8)) %>%
ggplot(aes(
x = factor(cyl),
y = hwy,
fill = factor(cyl)
)) +
# add half violin from `ggdist` package
ggdist::stat_halfeye(
# custom bandwidth
adjust = 0.5,
# move geom to right
justification = -0.2,
# remove slab interval
.width = 0,
point_color = NA
) +
# add boxplot
geom_boxplot(width = 0.12,
# remove outliers
outlier.colour = NA,
alpha = 0.5) +
# add dot plots from `ggdist` package
ggdist::stat_dots(#orientation of the plot
side = 'left',
# move geom to the left
justification = 1.1,
# adjust grouping of observation
binwidth = 0.25) +
# adjust theme
scale_fill_tq() +
theme_tq() +
labs(
title = 'raincloud plot',
subtitle = 'showing bimodel distribution of 6 cylinder vehicles',
x = 'highway fuel efficiency',
y = 'cylinders'
) +
coord_flip()
library(tidyverse)
# install.packages('hexbin')
class <- c(rep("10th", 8))
students <- c("10 to 15", "15-20", "17 to 24", "20 to 25", "25 to 30", "30 to 40",
"45 to 47", "50 to 55")
latitude <- c(11.50897246, 11.48323136, 11.48719031, 11.46366611, 11.41097322, 11.52111154,
11.44491386, 11.46569568)
longitude <- c(76.06032062, 76.06192685, 76.04266851, 76.04156575, 76.05075092, 76.02846331,
76.03084141, 76.01766216)
school <- data.frame(class, students, latitude, longitude)
school %>%
mutate(students = parse_number(students)) %>%
ggplot(aes(latitude, longitude, z = students)) + stat_summary_hex() + scale_fill_viridis_c(alpha = 0.8) +
labs(fill = "students", title = "school students")
## Warning: Computation failed in `stat_summary_hex()`
## Caused by error in `compute_group()`:
## ! The package "hexbin" is required for `stat_summary_hex()`
income.data <- data.frame(Village = c(rep("Chittor", 20), rep("Bellari", 20)), Income = c(rnorm(n = 20,
mean = 1000, sd = 150), rnorm(n = 20, mean = 1000, sd = 150)))
library(ggplot2)
ggplot(income.data, aes(Village, Income)) + geom_boxplot() + stat_summary(geom = "point",
fun = mean, col = "red")
income.data <- data.frame(Village = c(rep("Chittor", 20), rep("Bellari", 20)), Income = c(rnorm(n = 20,
mean = 1000, sd = 150), rnorm(n = 20, mean = 1000, sd = 150)))
library(ggplot2)
ggplot(income.data) + geom_vline(aes(xintercept = mean(Income)), linetype = "dashed") +
geom_density(aes(x = Income, color = Village)) + geom_vline(xintercept = 959,
linetype = "dotted", col = "#f39c96") + geom_vline(xintercept = 1051, linetype = "dotted",
col = "#00bfc4")
library(tidyverse)
# Using median
mpg %>%
mutate(class = fct_reorder(class, hwy, .fun = "median")) %>%
ggplot(aes(x = reorder(class, hwy), y = hwy, fill = class)) + geom_boxplot() +
xlab("class") + theme(legend.position = "none") + xlab("")
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
data <- data.frame(category = c("Poaceae", "Fabaceae", "Asteraceae", "Acanthaceae",
"Rubiaceae", "Euphorbiaceae", "Others"), count = c(18, 15, 8, 4, 4, 3, 17))
fig <- data %>%
plot_ly(labels = ~category, values = ~count)
fig <- fig %>%
add_pie(hole = 0.4) %>%
layout(title = "Donut charts using Plotly", showlegend = T)
fig
library(tidyverse)
df <- tribble(~ gender,
~ height,
'male',
12,
'male',
8,
'female',
11.5,
'female',
11)
ggplot(df, aes(gender, height)) +
geom_point() +
annotate(
geom = 'text',
x = 1.29,
y = 11.4,
label = 'short person',
color = 'red',
size = 3,
fontface = 'italic'
) +
annotate(
geom = 'segment',
x = 1.05,
# starting point on x, this decides length
xend = 1.3,
# end point on x, this decides length
y = 11.02,
# starting point on y
yend = 11.3,
# ending point on y
color = 'blue',
linetype = 'dashed'
) +
annotate(
geom = 'segment',
x = 1.95,
# starting point on x, this decides length
xend = 1.3,
# end point on x, this decides length
y = 8.2,
# starting point on y
yend = 11.3,
# ending point on y
color = 'blue',
linetype = 'dashed'
)
library(lubridate)
months <- seq(month(1:12)) # make moths
months <- month.abb[months] # make abbriviations
temperature <- c(10, 12, 22, 32, 35, 30, 33, 28, 29, 25, 19, 14)
myframe <- data.frame(months, temperature) # creating a new data frame
library(tidyverse)
glimpse(myframe)
## Rows: 12
## Columns: 2
## $ months <chr> "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "S…
## $ temperature <dbl> 10, 12, 22, 32, 35, 30, 33, 28, 29, 25, 19, 14
library(ggplot2)
ggplot(myframe, aes(x = months, y = temperature, group = 1)) + geom_line(col = "blue") +
geom_point(col = "red") + ggtitle("Temperature of months") + scale_x_discrete(limits = month.abb) # this will order months on the x axis
# create and view data frame
df <- data.frame(date = c("05/30/2021", "08/18/2021", "09/13/2021", "02/19/2021"),
sales = c(3, 15, 14, 9))
df <- df %>%
mutate(date = as.Date(date, format = "%m/%d/%Y")) %>%
arrange(date)
df
p + scale_x_discrete(limits = c("D0.5", "D2"))
## Warning: Removed 1 rows containing missing values (`position_stack()`).
df2 <- data.frame(supp = rep(c("VC", "OJ"), each = 3), dose = rep(c("D0.5", "D1",
"D2"), 2), len = c(6.8, 15, 33, 4.2, 10, 29.5))
ggplot(data = df2, aes(x = dose, y = len, fill = supp)) + geom_bar(stat = "identity",
position = position_dodge()) + geom_text(aes(label = len), vjust = 1.6, color = "white",
position = position_dodge(0.9), size = 3.5) + scale_fill_brewer(palette = "Paired") +
theme_minimal()
# Stacked barplot with multiple groups
ggplot(data = df2, aes(x = dose, y = len, fill = supp)) + geom_bar(stat = "identity")
# Use position=position_dodge()
ggplot(data = df2, aes(x = dose, y = len, fill = supp)) + geom_bar(stat = "identity",
position = position_dodge())
# Change the colors manually
p <- ggplot(data = df2, aes(x = dose, y = len, fill = supp)) + geom_bar(stat = "identity",
color = "black", position = position_dodge()) + theme_minimal()
# Use custom colors
p + scale_fill_manual(values = c("#999999", "#E69F00"))
# Use brewer color palettes
p + scale_fill_brewer(palette = "Blues")
libraries
# install.packages('MetBrewer')
library(MetBrewer)
Plot the point plot using GDP per Capita as the x- axis and LE as the y axis. Numerical variable Population to control the size of each point.
plot <- gapminder %>%
filter(year == 2007) %>%
ggplot() + labs(x = "GDP per Capita", y = "Life Expectancy", color = "Population in millions",
size = "Population in millions") + theme_minimal()
plot + geom_point(aes(gdpPercap, lifeExp, size = pop/1e+06))
To use color in the plot, assign the Population variable to the color aesthetic. Since nothing is specied, ggplot2 chooses a color spectrum for this numerical variable (shades of blue).
plot + geom_point(aes(gdpPercap, lifeExp, size = pop/1e+06, color = pop/1e+06))
To control the color spectrum, we need to introduce a color scale. In
the following plot, we have to provide a vector of hex color values. You
would choose this if you got your colors from one of the mentioned above
websites.
plot + geom_point(aes(gdpPercap, lifeExp, size = pop/1e+06, color = pop/1e+06)) +
scale_color_gradientn(colors = c("#003049", "#D62828", "#F77F00", "#FCBF49",
"#EAE2B7"))
To apply one of the MetBrewer palettes, replace the hex-vector with a MetBrewer function. Within the function call, you provide the palette’s name, then several colors, and tell it that we need a continuous palette since it is a numerical variable.
plot + geom_point(aes(gdpPercap, lifeExp, size = pop/1e+06, color = pop/1e+06)) +
scale_color_gradientn(colors = met.brewer("Cross", n = 500, type = "continuous"))
You might also want to use color palettes with non-numerical variables. Let us assume we want to apply color to the Continent variable. This implies using a manual color scale and providing a MetBrewer palette.
plot + geom_point(aes(gdpPercap, lifeExp, size = pop/1e+06, color = continent)) +
scale_color_manual(values = met.brewer("Navajo", 5))
Please note if you want to apply color to the fill aesthetic rather than the color aesthetic, consider using the scale_fill_manuel function instead of the scale_color_manuel. This is useful for boxplots or bar charts.
gapminder %>%
filter(gdpPercap < 60000) %>%
ggplot(aes(continent, gdpPercap, color = year, fill = continent)) + geom_boxplot() +
theme_minimal() + labs(x = "Continent", y = "GDP per Capita", fill = "Continent")
## Warning: The following aesthetics were dropped during statistical transformation: colour
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
df <- data.frame(Names = as.factor(c("Bacteria", "Yeast", "None")), Quantity = c(2.5,
5.5, 7.5))
library(ggplot2)
library(tidyverse)
df <- df %>%
mutate(Names = fct_relevel(Names, c("Bacteria", "Yeast", "None")))
ggplot(df, aes(Names, Quantity, fill = Names)) + geom_bar(stat = "identity") + scale_fill_manual(values = c("#110a62",
"#fcd749", "#b5b4b5")) + labs(y = "Necter pH", x = "Microbe added to nectar") +
theme_classic() + theme(legend.position = "none", axis.ticks.x = element_blank()) +
theme(axis.text = element_text(size = 22, color = "black")) + theme(axis.line.x = element_blank()) +
theme(axis.ticks = element_line(size = 1, color = "black"), axis.ticks.length = unit(0.5,
"cm")) + theme(text = element_text(size = 22))
## Warning: The `size` argument of `element_line()` is deprecated as of ggplot2 3.4.0.
## ℹ Please use the `linewidth` argument instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
x11() # opne a new window for graphics
graphics.off() # close the new window
Normal distribution, also known as the Gaussian distribution, is a probability distribution that is symmetric about the mean, showing that data near the mean are more frequent in occurrence than data far from the mean.
library(tidyverse)
n = 1000
mean = 170 # cm
sd = 6.35 # cm
binwidth = 0.3
set.seed(1234)
df <- data.frame(x = rnorm(n, mean, sd))
ggplot(df, aes(x = x, mean = mean, sd = sd, binwidth = binwidth, n = n)) + theme_bw() +
geom_histogram(binwidth = binwidth, colour = "white", fill = "lightblue", size = 0.1) +
stat_function(fun = function(x) dnorm(x, mean = mean, sd = sd) * n * binwidth,
color = "darkred", size = 1)
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
df <- data.frame(name = c("saneesh", "kishan", "anil", "mahi", "sanusha"), sex = c("male",
"female", "male", "male", "female"), weight = c(60, 58, 65, 70, 48), favno = c(2,
6, 10, 1, 15))
ggplot(df, aes(x = sex, y = weight, col = name, size = favno, shape = sex)) + geom_point()
# remove all legends
ggplot(df, aes(x = sex, y = weight, col = name, size = favno)) + geom_point() + theme(legend.position = "none")
# remove legend created by color
ggplot(df, aes(x = sex, y = weight, col = name, size = favno)) + geom_point() + guides(color = "none")
# remove legend created by shape
ggplot(df, aes(x = sex, y = weight, col = name, size = favno)) + geom_point() + guides(shape = "none")
# remove legend created by size
ggplot(df, aes(x = sex, y = weight, col = name, size = favno)) + geom_point() + guides(size = "none")
# packages----
library(sf) #
## Linking to GEOS 3.9.3, GDAL 3.5.2, PROJ 8.2.1; sf_use_s2() is TRUE
library(tidyverse) #
india.shape <- sf::st_read("C:/Users/ty00osat/OneDrive/R_projects/tidyandwork/india_shp_files/Admin2.shp") # all 8 files in the folder are required.
## Reading layer `Admin2' from data source
## `C:\Users\ty00osat\OneDrive\R_projects\tidyandwork\india_shp_files\Admin2.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 36 features and 1 field
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: 68.18625 ymin: 6.755953 xmax: 97.41529 ymax: 37.07827
## Geodetic CRS: WGS 84
# plot(shp)
state_area <- read.csv("state_area.csv")
state_area <- state_area %>%
rename(ST_NM = id)
shape.file <- fortify(india.shape, region = "ST_NM")
# names(shp) names(imr) names(shp.f)
merge.Indshp.area <- left_join(shape.file, state_area, by = "ST_NM")
final.plot <- merge.Indshp.area %>%
arrange(areaRank)
india <- ggplot() + geom_sf(data = final.plot, aes(fill = areaRank, alpha = 0.2),
col = "black") + theme(legend.position = " ")
# add specific location to the map
places <- data.frame(name = c("Delhi", "Mumbai"), Lat = c(28.7041, 19.076), Long = c(77.1025,
72.8777))
india + geom_point(data = places, (aes(x = Long, y = Lat, col = name))) + geom_text(data = places,
aes(x = Long, y = Lat, label = name), size = 3, fontface = "bold", col = "white")
# ggsave('animalstudy.jpg',dpi = 300, width = 20, height = 20, units = 'cm')
dice <- c(1:6)
myluck <- function(x) {
myluck <- sample(dice, size = 1, replace = T)
return(myluck)
}
myluck()
## [1] 2
names <- c("saneesh", "appu", "sanusha")
who <- function(x) {
who <- sample(names, 1, T)
return(who)
}
who()
## [1] "saneesh"
df <- data.frame(name = as.factor(c("James Bond", "Spider Man", "Iron Man")))
# df <- df %>% separate(name, c('Genus', 'Species'), sep = '([ ])')
shorten <- function(df) {
name_split <- df %>%
separate(name, c("Genus", "Species"), sep = "([ ])")
print(name_split)
}
shorten(df)
## Genus Species
## 1 James Bond
## 2 Spider Man
## 3 Iron Man
library(rvest)
##
## Attaching package: 'rvest'
## The following object is masked from 'package:readr':
##
## guess_encoding
page <- read_html("https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population")
tables <- html_table(page)
typeof(tables)
## [1] "list"
unlist(tables)
## X1
## NA
## X2
## "This article needs to be updated. The reason given is: Some of the populations estimates are outdated. Please help update this article to reflect recent events or newly available information. (February 2023)"
## Rank1
## "Rank"
## Rank2
## "–"
## Rank3
## "1"
## Rank4
## "2"
## Rank5
## "3"
## Rank6
## "4"
## Rank7
## "5"
## Rank8
## "6"
## Rank9
## "7"
## Rank10
## "8"
## Rank11
## "9"
## Rank12
## "10"
## Rank13
## "11"
## Rank14
## "12"
## Rank15
## "13"
## Rank16
## "14"
## Rank17
## "15"
## Rank18
## "16"
## Rank19
## "17"
## Rank20
## "18"
## Rank21
## "19"
## Rank22
## "20"
## Rank23
## "21"
## Rank24
## "22"
## Rank25
## "23"
## Rank26
## "24"
## Rank27
## "25"
## Rank28
## "26"
## Rank29
## "27"
## Rank30
## "28"
## Rank31
## "29"
## Rank32
## "30"
## Rank33
## "31"
## Rank34
## "32"
## Rank35
## "33"
## Rank36
## "34"
## Rank37
## "35"
## Rank38
## "36"
## Rank39
## "37"
## Rank40
## "38"
## Rank41
## "39"
## Rank42
## "40"
## Rank43
## "41"
## Rank44
## "42"
## Rank45
## "43"
## Rank46
## "44"
## Rank47
## "45"
## Rank48
## "46"
## Rank49
## "47"
## Rank50
## "48"
## Rank51
## "49"
## Rank52
## "50"
## Rank53
## "51"
## Rank54
## "52"
## Rank55
## "53"
## Rank56
## "54"
## Rank57
## "55"
## Rank58
## "56"
## Rank59
## "–"
## Rank60
## "57"
## Rank61
## "58"
## Rank62
## "59"
## Rank63
## "60"
## Rank64
## "61"
## Rank65
## "62"
## Rank66
## "63"
## Rank67
## "64"
## Rank68
## "65"
## Rank69
## "66"
## Rank70
## "67"
## Rank71
## "68"
## Rank72
## "69"
## Rank73
## "70"
## Rank74
## "71"
## Rank75
## "72"
## Rank76
## "73"
## Rank77
## "74"
## Rank78
## "75"
## Rank79
## "76"
## Rank80
## "77"
## Rank81
## "78"
## Rank82
## "79"
## Rank83
## "80"
## Rank84
## "81"
## Rank85
## "82"
## Rank86
## "83"
## Rank87
## "84"
## Rank88
## "85"
## Rank89
## "86"
## Rank90
## "87"
## Rank91
## "88"
## Rank92
## "89"
## Rank93
## "90"
## Rank94
## "91"
## Rank95
## "92"
## Rank96
## "93"
## Rank97
## "94"
## Rank98
## "95"
## Rank99
## "96"
## Rank100
## "97"
## Rank101
## "98"
## Rank102
## "99"
## Rank103
## "100"
## Rank104
## "101"
## Rank105
## "102"
## Rank106
## "103"
## Rank107
## "–"
## Rank108
## "104"
## Rank109
## "105"
## Rank110
## "106"
## Rank111
## "107"
## Rank112
## "108"
## Rank113
## "109"
## Rank114
## "110"
## Rank115
## "111"
## Rank116
## "112"
## Rank117
## "113"
## Rank118
## "114"
## Rank119
## "115"
## Rank120
## "116"
## Rank121
## "117"
## Rank122
## "118"
## Rank123
## "119"
## Rank124
## "120"
## Rank125
## "121"
## Rank126
## "122"
## Rank127
## "123"
## Rank128
## "124"
## Rank129
## "125"
## Rank130
## "126"
## Rank131
## "127"
## Rank132
## "128"
## Rank133
## "129"
## Rank134
## "130"
## Rank135
## "131"
## Rank136
## "132"
## Rank137
## "133"
## Rank138
## "–"
## Rank139
## "134"
## Rank140
## "135"
## Rank141
## "136"
## Rank142
## "137"
## Rank143
## "138"
## Rank144
## "139"
## Rank145
## "140"
## Rank146
## "141"
## Rank147
## "142"
## Rank148
## "143"
## Rank149
## "144"
## Rank150
## "145"
## Rank151
## "146"
## Rank152
## "147"
## Rank153
## "–"
## Rank154
## "148"
## Rank155
## "149"
## Rank156
## "150"
## Rank157
## "151"
## Rank158
## "152"
## Rank159
## "153"
## Rank160
## "154"
## Rank161
## "155"
## Rank162
## "156"
## Rank163
## "157"
## Rank164
## "158"
## Rank165
## "159"
## Rank166
## "160"
## Rank167
## "161"
## Rank168
## "162"
## Rank169
## "–"
## Rank170
## "163"
## Rank171
## "164"
## Rank172
## "165"
## Rank173
## "–"
## Rank174
## "166"
## Rank175
## "167"
## Rank176
## "168"
## Rank177
## "169"
## Rank178
## "170"
## Rank179
## "171"
## Rank180
## "172"
## Rank181
## "–"
## Rank182
## "–"
## Rank183
## "173"
## Rank184
## "174"
## Rank185
## "–"
## Rank186
## "–"
## Rank187
## "–"
## Rank188
## "175"
## Rank189
## "176"
## Rank190
## "177"
## Rank191
## "–"
## Rank192
## "–"
## Rank193
## "–"
## Rank194
## "178"
## Rank195
## "179"
## Rank196
## "180"
## Rank197
## "–"
## Rank198
## "–"
## Rank199
## "181"
## Rank200
## "182"
## Rank201
## "183"
## Rank202
## "184"
## Rank203
## "–"
## Rank204
## "–"
## Rank205
## "185"
## Rank206
## "186"
## Rank207
## "–"
## Rank208
## "–"
## Rank209
## "–"
## Rank210
## "–"
## Rank211
## "–"
## Rank212
## "–"
## Rank213
## "–"
## Rank214
## "187"
## Rank215
## "–"
## Rank216
## "–"
## Rank217
## "–"
## Rank218
## "188"
## Rank219
## "189"
## Rank220
## "190"
## Rank221
## "191"
## Rank222
## "–"
## Rank223
## "–"
## Rank224
## "–"
## Rank225
## "–"
## Rank226
## "192"
## Rank227
## "–"
## Rank228
## "–"
## Rank229
## "193"
## Rank230
## "–"
## Rank231
## "194"
## Rank232
## "–"
## Rank233
## "–"
## Rank234
## "–"
## Rank235
## "–"
## Rank236
## "–"
## Rank237
## "–"
## Rank238
## "–"
## Rank239
## "–"
## Rank240
## "–"
## Rank241
## "195"
## Rank242
## "–"
## Rank243
## "–"
## Country / Dependency1
## "Country / Dependency"
## Country / Dependency2
## "World"
## Country / Dependency3
## "China"
## Country / Dependency4
## "India"
## Country / Dependency5
## "United States"
## Country / Dependency6
## "Indonesia"
## Country / Dependency7
## "Pakistan"
## Country / Dependency8
## "Nigeria"
## Country / Dependency9
## "Brazil"
## Country / Dependency10
## "Bangladesh"
## Country / Dependency11
## "Russia"
## Country / Dependency12
## "Mexico"
## Country / Dependency13
## "Japan"
## Country / Dependency14
## "Philippines"
## Country / Dependency15
## "Ethiopia"
## Country / Dependency16
## "Egypt"
## Country / Dependency17
## "Vietnam"
## Country / Dependency18
## "DR Congo"
## Country / Dependency19
## "Iran"
## Country / Dependency20
## "Turkey"
## Country / Dependency21
## "Germany"
## Country / Dependency22
## "France"
## Country / Dependency23
## "United Kingdom"
## Country / Dependency24
## "Thailand"
## Country / Dependency25
## "Tanzania"
## Country / Dependency26
## "South Africa"
## Country / Dependency27
## "Italy"
## Country / Dependency28
## "Myanmar"
## Country / Dependency29
## "Colombia"
## Country / Dependency30
## "South Korea"
## Country / Dependency31
## "Spain"
## Country / Dependency32
## "Kenya"
## Country / Dependency33
## "Argentina"
## Country / Dependency34
## "Algeria"
## Country / Dependency35
## "Sudan"
## Country / Dependency36
## "Uganda"
## Country / Dependency37
## "Iraq"
## Country / Dependency38
## "Ukraine"
## Country / Dependency39
## "Canada"
## Country / Dependency40
## "Poland"
## Country / Dependency41
## "Morocco"
## Country / Dependency42
## "Uzbekistan"
## Country / Dependency43
## "Saudi Arabia"
## Country / Dependency44
## "Yemen"
## Country / Dependency45
## "Peru"
## Country / Dependency46
## "Angola"
## Country / Dependency47
## "Malaysia"
## Country / Dependency48
## "Afghanistan"
## Country / Dependency49
## "Mozambique"
## Country / Dependency50
## "Ghana"
## Country / Dependency51
## "Ivory Coast"
## Country / Dependency52
## "Nepal"
## Country / Dependency53
## "Venezuela"
## Country / Dependency54
## "Madagascar"
## Country / Dependency55
## "Australia"
## Country / Dependency56
## "North Korea"
## Country / Dependency57
## "Cameroon"
## Country / Dependency58
## "Niger"
## Country / Dependency59
## "Taiwan"
## Country / Dependency60
## "Mali"
## Country / Dependency61
## "Burkina Faso"
## Country / Dependency62
## "Sri Lanka"
## Country / Dependency63
## "Syria"
## Country / Dependency64
## "Malawi"
## Country / Dependency65
## "Chile"
## Country / Dependency66
## "Kazakhstan"
## Country / Dependency67
## "Zambia"
## Country / Dependency68
## "Romania"
## Country / Dependency69
## "Ecuador"
## Country / Dependency70
## "Netherlands"
## Country / Dependency71
## "Somalia"
## Country / Dependency72
## "Senegal"
## Country / Dependency73
## "Guatemala"
## Country / Dependency74
## "Chad"
## Country / Dependency75
## "Cambodia"
## Country / Dependency76
## "Zimbabwe"
## Country / Dependency77
## "South Sudan"
## Country / Dependency78
## "Rwanda"
## Country / Dependency79
## "Guinea"
## Country / Dependency80
## "Burundi"
## Country / Dependency81
## "Benin"
## Country / Dependency82
## "Bolivia"
## Country / Dependency83
## "Tunisia"
## Country / Dependency84
## "Belgium"
## Country / Dependency85
## "Haiti"
## Country / Dependency86
## "Jordan"
## Country / Dependency87
## "Cuba"
## Country / Dependency88
## "Dominican Republic"
## Country / Dependency89
## "Czech Republic"
## Country / Dependency90
## "Sweden"
## Country / Dependency91
## "Greece"
## Country / Dependency92
## "Portugal"
## Country / Dependency93
## "Azerbaijan"
## Country / Dependency94
## "Israel"
## Country / Dependency95
## "Hungary"
## Country / Dependency96
## "Honduras"
## Country / Dependency97
## "Tajikistan"
## Country / Dependency98
## "United Arab Emirates"
## Country / Dependency99
## "Belarus"
## Country / Dependency100
## "Papua New Guinea"
## Country / Dependency101
## "Austria"
## Country / Dependency102
## "Switzerland"
## Country / Dependency103
## "Sierra Leone"
## Country / Dependency104
## "Togo"
## Country / Dependency105
## "Paraguay"
## Country / Dependency106
## "Laos"
## Country / Dependency107
## "Hong Kong (China)"
## Country / Dependency108
## "Kyrgyzstan"
## Country / Dependency109
## "El Salvador"
## Country / Dependency110
## "Libya"
## Country / Dependency111
## "Serbia"
## Country / Dependency112
## "Nicaragua"
## Country / Dependency113
## "Bulgaria"
## Country / Dependency114
## "Turkmenistan"
## Country / Dependency115
## "Congo"
## Country / Dependency116
## "Denmark"
## Country / Dependency117
## "Central African Republic"
## Country / Dependency118
## "Finland"
## Country / Dependency119
## "Lebanon"
## Country / Dependency120
## "Norway"
## Country / Dependency121
## "Palestine"
## Country / Dependency122
## "Singapore"
## Country / Dependency123
## "Slovakia"
## Country / Dependency124
## "Costa Rica"
## Country / Dependency125
## "New Zealand"
## Country / Dependency126
## "Ireland"
## Country / Dependency127
## "Oman"
## Country / Dependency128
## "Kuwait"
## Country / Dependency129
## "Liberia"
## Country / Dependency130
## "Mauritania"
## Country / Dependency131
## "Panama"
## Country / Dependency132
## "Croatia"
## Country / Dependency133
## "Georgia"
## Country / Dependency134
## "Eritrea"
## Country / Dependency135
## "Uruguay"
## Country / Dependency136
## "Mongolia"
## Country / Dependency137
## "Bosnia and Herzegovina"
## Country / Dependency138
## "Puerto Rico (United States)"
## Country / Dependency139
## "Armenia"
## Country / Dependency140
## "Lithuania"
## Country / Dependency141
## "Qatar"
## Country / Dependency142
## "Albania"
## Country / Dependency143
## "Jamaica"
## Country / Dependency144
## "Gambia"
## Country / Dependency145
## "Moldova"
## Country / Dependency146
## "Namibia"
## Country / Dependency147
## "Botswana"
## Country / Dependency148
## "Lesotho"
## Country / Dependency149
## "Gabon"
## Country / Dependency150
## "Slovenia"
## Country / Dependency151
## "Latvia"
## Country / Dependency152
## "North Macedonia"
## Country / Dependency153
## "Kosovo"
## Country / Dependency154
## "Guinea-Bissau"
## Country / Dependency155
## "Equatorial Guinea"
## Country / Dependency156
## "Bahrain"
## Country / Dependency157
## "Trinidad and Tobago"
## Country / Dependency158
## "Estonia"
## Country / Dependency159
## "East Timor"
## Country / Dependency160
## "Mauritius"
## Country / Dependency161
## "Eswatini"
## Country / Dependency162
## "Djibouti"
## Country / Dependency163
## "Cyprus"
## Country / Dependency164
## "Fiji"
## Country / Dependency165
## "Bhutan"
## Country / Dependency166
## "Comoros"
## Country / Dependency167
## "Guyana"
## Country / Dependency168
## "Solomon Islands"
## Country / Dependency169
## "Macau (China)"
## Country / Dependency170
## "Luxembourg"
## Country / Dependency171
## "Montenegro"
## Country / Dependency172
## "Suriname"
## Country / Dependency173
## "Western Sahara"
## Country / Dependency174
## "Cape Verde"
## Country / Dependency175
## "Malta"
## Country / Dependency176
## "Belize"
## Country / Dependency177
## "Brunei"
## Country / Dependency178
## "Maldives"
## Country / Dependency179
## "Bahamas"
## Country / Dependency180
## "Iceland"
## Country / Dependency181
## "Northern Cyprus"
## Country / Dependency182
## "Transnistria"
## Country / Dependency183
## "Vanuatu"
## Country / Dependency184
## "Barbados"
## Country / Dependency185
## "French Polynesia (France)"
## Country / Dependency186
## "New Caledonia (France)"
## Country / Dependency187
## "Abkhazia"
## Country / Dependency188
## "São Tomé and Príncipe"
## Country / Dependency189
## "Samoa"
## Country / Dependency190
## "Saint Lucia"
## Country / Dependency191
## "Guam (United States)"
## Country / Dependency192
## "Curaçao (Netherlands)"
## Country / Dependency193
## "Artsakh"
## Country / Dependency194
## "Grenada"
## Country / Dependency195
## "Kiribati"
## Country / Dependency196
## "Saint Vincent and the Grenadines"
## Country / Dependency197
## "Jersey (British Crown Dependency)"
## Country / Dependency198
## "Aruba (Netherlands)"
## Country / Dependency199
## "Micronesia"
## Country / Dependency200
## "Antigua and Barbuda"
## Country / Dependency201
## "Seychelles"
## Country / Dependency202
## "Tonga"
## Country / Dependency203
## "U.S. Virgin Islands (United States)"
## Country / Dependency204
## "Isle of Man (British Crown Dependency)"
## Country / Dependency205
## "Andorra"
## Country / Dependency206
## "Dominica"
## Country / Dependency207
## "Cayman Islands (United Kingdom)"
## Country / Dependency208
## "Bermuda (United Kingdom)"
## Country / Dependency209
## "Guernsey (British Crown Dependency)"
## Country / Dependency210
## "Greenland (Denmark)"
## Country / Dependency211
## "Faroe Islands (Denmark)"
## Country / Dependency212
## "South Ossetia"
## Country / Dependency213
## "American Samoa (United States)"
## Country / Dependency214
## "Saint Kitts and Nevis"
## Country / Dependency215
## "Northern Mariana Islands (United States)"
## Country / Dependency216
## "Turks and Caicos Islands (United Kingdom)"
## Country / Dependency217
## "Sint Maarten (Netherlands)"
## Country / Dependency218
## "Liechtenstein"
## Country / Dependency219
## "Marshall Islands"
## Country / Dependency220
## "Monaco"
## Country / Dependency221
## "San Marino"
## Country / Dependency222
## "Gibraltar (United Kingdom)"
## Country / Dependency223
## "Saint Martin (France)"
## Country / Dependency224
## "British Virgin Islands (United Kingdom)"
## Country / Dependency225
## "Åland (Finland)"
## Country / Dependency226
## "Palau"
## Country / Dependency227
## "Anguilla (United Kingdom)"
## Country / Dependency228
## "Cook Islands"
## Country / Dependency229
## "Nauru"
## Country / Dependency230
## "Wallis and Futuna (France)"
## Country / Dependency231
## "Tuvalu"
## Country / Dependency232
## "Saint Barthélemy (France)"
## Country / Dependency233
## "Saint Pierre and Miquelon (France)"
## Country / Dependency234
## "Saint Helena, Ascension and Tristan da Cunha (United Kingdom)"
## Country / Dependency235
## "Montserrat (United Kingdom)"
## Country / Dependency236
## "Falkland Islands (United Kingdom)"
## Country / Dependency237
## "Norfolk Island (Australia)"
## Country / Dependency238
## "Christmas Island (Australia)"
## Country / Dependency239
## "Tokelau (New Zealand)"
## Country / Dependency240
## "Niue"
## Country / Dependency241
## "Vatican City"
## Country / Dependency242
## "Cocos (Keeling) Islands (Australia)"
## Country / Dependency243
## "Pitcairn Islands (United Kingdom)"
## Population1
## "Numbers"
## Population2
## "8,029,442,000"
## Population3
## "1,411,750,000"
## Population4
## "1,392,329,000"
## Population5
## "334,730,000"
## Population6
## "277,749,853"
## Population7
## "239,017,494"
## Population8
## "218,541,000"
## Population9
## "216,119,742"
## Population10
## "169,828,911"
## Population11
## "146,424,729"
## Population12
## "128,665,641"
## Population13
## "124,470,000"
## Population14
## "110,587,187"
## Population15
## "105,163,988"
## Population16
## "104,785,661"
## Population17
## "99,460,000"
## Population18
## "99,010,000"
## Population19
## "86,419,386"
## Population20
## "85,279,553"
## Population21
## "84,270,625"
## Population22
## "68,042,591"
## Population23
## "67,026,292"
## Population24
## "66,004,232"
## Population25
## "61,741,120"
## Population26
## "60,604,992"
## Population27
## "58,815,463"
## Population28
## "55,770,232"
## Population29
## "52,215,503"
## Population30
## "51,439,038"
## Population31
## "47,615,034"
## Population32
## "47,564,296"
## Population33
## "46,044,703"
## Population34
## "45,400,000"
## Population35
## "45,375,960"
## Population36
## "42,885,900"
## Population37
## "41,190,700"
## Population38
## "41,130,432"
## Population39
## "39,880,055"
## Population40
## "37,738,000"
## Population41
## "36,948,290"
## Population42
## "36,208,240"
## Population43
## "34,110,821"
## Population44
## "33,697,000"
## Population45
## "33,396,698"
## Population46
## "33,086,278"
## Population47
## "33,035,500"
## Population48
## "32,890,171"
## Population49
## "32,419,747"
## Population50
## "30,832,019"
## Population51
## "29,389,150"
## Population52
## "29,164,578"
## Population53
## "28,302,000"
## Population54
## "26,923,353"
## Population55
## "26,471,293"
## Population56
## "25,660,000"
## Population57
## "24,348,251"
## Population58
## "24,112,753"
## Population59
## "23,332,929"
## Population60
## "22,594,000"
## Population61
## "22,185,654"
## Population62
## "22,181,000"
## Population63
## "22,125,000"
## Population64
## "21,507,723"
## Population65
## "19,960,889"
## Population66
## "19,853,068"
## Population67
## "19,610,769"
## Population68
## "19,053,815"
## Population69
## "18,287,795"
## Population70
## "17,865,790"
## Population71
## "17,598,000"
## Population72
## "17,223,497"
## Population73
## "17,109,746"
## Population74
## "16,818,391"
## Population75
## "15,552,211"
## Population76
## "15,178,979"
## Population77
## "13,249,924"
## Population78
## "13,246,394"
## Population79
## "12,907,395"
## Population80
## "12,574,571"
## Population81
## "12,506,347"
## Population82
## "12,006,031"
## Population83
## "11,803,588"
## Population84
## "11,750,239"
## Population85
## "11,743,017"
## Population86
## "11,389,522"
## Population87
## "11,113,215"
## Population88
## "10,535,535"
## Population89
## "10,526,937"
## Population90
## "10,528,561"
## Population91
## "10,482,487"
## Population92
## "10,421,117"
## Population93
## "10,135,373"
## Population94
## "9,717,920"
## Population95
## "9,678,000"
## Population96
## "9,546,178"
## Population97
## "9,506,000"
## Population98
## "9,282,410"
## Population99
## "9,255,524"
## Population100
## "9,122,994"
## Population101
## "9,106,126"
## Population102
## "8,812,728"
## Population103
## "8,494,260"
## Population104
## "8,095,498"
## Population105
## "7,353,038"
## Population106
## "7,337,783"
## Population107
## "7,333,200"
## Population108
## "7,100,000"
## Population109
## "6,884,888"
## Population110
## "6,812,000"
## Population111
## "6,647,003"
## Population112
## "6,595,674"
## Population113
## "6,519,789"
## Population114
## "6,431,000"
## Population115
## "5,970,000"
## Population116
## "5,932,654"
## Population117
## "5,633,412"
## Population118
## "5,537,449"
## Population119
## "5,490,000"
## Population120
## "5,488,984"
## Population121
## "5,483,450"
## Population122
## "5,453,600"
## Population123
## "5,428,792"
## Population124
## "5,213,362"
## Population125
## "5,164,900"
## Population126
## "5,123,536"
## Population127
## "5,009,188"
## Population128
## "4,670,713"
## Population129
## "4,661,010"
## Population130
## "4,372,037"
## Population131
## "4,278,500"
## Population132
## "3,871,833"
## Population133
## "3,688,600"
## Population134
## "3,684,000"
## Population135
## "3,554,915"
## Population136
## "3,496,125"
## Population137
## "3,320,954"
## Population138
## "3,285,874"
## Population139
## "2,976,800"
## Population140
## "2,862,380"
## Population141
## "2,799,202"
## Population142
## "2,793,592"
## Population143
## "2,727,503"
## Population144
## "2,706,000"
## Population145
## "2,597,100"
## Population146
## "2,550,226"
## Population147
## "2,410,338"
## Population148
## "2,306,000"
## Population149
## "2,233,272"
## Population150
## "2,116,972"
## Population151
## "1,886,200"
## Population152
## "1,832,696"
## Population153
## "1,798,188"
## Population154
## "1,646,077"
## Population155
## "1,505,588"
## Population156
## "1,501,635"
## Population157
## "1,365,805"
## Population158
## "1,357,739"
## Population159
## "1,336,222"
## Population160
## "1,261,196"
## Population161
## "1,202,000"
## Population162
## "1,001,454"
## Population163
## "918,100"
## Population164
## "893,468"
## Population165
## "763,200"
## Population166
## "758,316"
## Population167
## "743,699"
## Population168
## "728,041"
## Population169
## "672,800"
## Population170
## "660,809"
## Population171
## "617,683"
## Population172
## "616,500"
## Population173
## "576,000"
## Population174
## "569,509"
## Population175
## "519,562"
## Population176
## "441,471"
## Population177
## "440,715"
## Population178
## "515,122"
## Population179
## "399,314"
## Population180
## "390,830"
## Population181
## "382,836"
## Population182
## "360,938"
## Population183
## "301,295"
## Population184
## "282,000"
## Population185
## "279,890"
## Population186
## "273,674"
## Population187
## "245,424"
## Population188
## "214,610"
## Population189
## "205,557"
## Population190
## "178,696"
## Population191
## "153,836"
## Population192
## "148,925"
## Population193
## "148,900"
## Population194
## "125,000"
## Population195
## "120,740"
## Population196
## "110,696"
## Population197
## "107,800"
## Population198
## "106,739"
## Population199
## "105,754"
## Population200
## "100,772"
## Population201
## "100,447"
## Population202
## "100,179"
## Population203
## "87,146"
## Population204
## "84,069"
## Population205
## "82,041"
## Population206
## "73,000"
## Population207
## "71,105"
## Population208
## "64,055"
## Population209
## "63,711"
## Population210
## "56,609"
## Population211
## "54,303"
## Population212
## "56,520"
## Population213
## "49,710"
## Population214
## "48,000"
## Population215
## "47,329"
## Population216
## "46,131"
## Population217
## "42,577"
## Population218
## "39,680"
## Population219
## "39,262"
## Population220
## "39,150"
## Population221
## "33,840"
## Population222
## "33,000"
## Population223
## "32,358"
## Population224
## "31,000"
## Population225
## "30,419"
## Population226
## "16,733"
## Population227
## "15,701"
## Population228
## "15,040"
## Population229
## "11,832"
## Population230
## "11,369"
## Population231
## "10,679"
## Population232
## "10,585"
## Population233
## "6,092"
## Population234
## "5,651"
## Population235
## "4,400"
## Population236
## "3,800"
## Population237
## "2,188"
## Population238
## "1,692"
## Population239
## "1,647"
## Population240
## "1,549"
## Population241
## "825"
## Population242
## "593"
## Population243
## "47"
## Population1
## "% of the world"
## Population2
## "100%"
## Population3
## "17.6%"
## Population4
## "17.3%"
## Population5
## "4.17%"
## Population6
## "3.46%"
## Population7
## "2.98%"
## Population8
## "2.72%"
## Population9
## "2.69%"
## Population10
## "2.12%"
## Population11
## "1.82%"
## Population12
## "1.60%"
## Population13
## "1.55%"
## Population14
## "1.38%"
## Population15
## "1.31%"
## Population16
## "1.31%"
## Population17
## "1.24%"
## Population18
## "1.23%"
## Population19
## "1.08%"
## Population20
## "1.06%"
## Population21
## "1.05%"
## Population22
## "0.847%"
## Population23
## "0.835%"
## Population24
## "0.822%"
## Population25
## "0.769%"
## Population26
## "0.755%"
## Population27
## "0.732%"
## Population28
## "0.695%"
## Population29
## "0.650%"
## Population30
## "0.641%"
## Population31
## "0.593%"
## Population32
## "0.592%"
## Population33
## "0.573%"
## Population34
## "0.565%"
## Population35
## "0.565%"
## Population36
## "0.534%"
## Population37
## "0.513%"
## Population38
## "0.512%"
## Population39
## "0.497%"
## Population40
## "0.470%"
## Population41
## "0.460%"
## Population42
## "0.451%"
## Population43
## "0.425%"
## Population44
## "0.420%"
## Population45
## "0.416%"
## Population46
## "0.412%"
## Population47
## "0.411%"
## Population48
## "0.410%"
## Population49
## "0.404%"
## Population50
## "0.384%"
## Population51
## "0.366%"
## Population52
## "0.363%"
## Population53
## "0.352%"
## Population54
## "0.335%"
## Population55
## "0.330%"
## Population56
## "0.320%"
## Population57
## "0.303%"
## Population58
## "0.300%"
## Population59
## "0.291%"
## Population60
## "0.281%"
## Population61
## "0.276%"
## Population62
## "0.276%"
## Population63
## "0.276%"
## Population64
## "0.268%"
## Population65
## "0.249%"
## Population66
## "0.247%"
## Population67
## "0.244%"
## Population68
## "0.237%"
## Population69
## "0.228%"
## Population70
## "0.223%"
## Population71
## "0.219%"
## Population72
## "0.215%"
## Population73
## "0.213%"
## Population74
## "0.209%"
## Population75
## "0.194%"
## Population76
## "0.189%"
## Population77
## "0.165%"
## Population78
## "0.165%"
## Population79
## "0.161%"
## Population80
## "0.157%"
## Population81
## "0.156%"
## Population82
## "0.150%"
## Population83
## "0.147%"
## Population84
## "0.146%"
## Population85
## "0.146%"
## Population86
## "0.142%"
## Population87
## "0.138%"
## Population88
## "0.131%"
## Population89
## "0.131%"
## Population90
## "0.131%"
## Population91
## "0.131%"
## Population92
## "0.130%"
## Population93
## "0.126%"
## Population94
## "0.121%"
## Population95
## "0.121%"
## Population96
## "0.119%"
## Population97
## "0.118%"
## Population98
## "0.116%"
## Population99
## "0.115%"
## Population100
## "0.114%"
## Population101
## "0.113%"
## Population102
## "0.110%"
## Population103
## "0.106%"
## Population104
## "0.101%"
## Population105
## "0.0916%"
## Population106
## "0.0914%"
## Population107
## "0.0913%"
## Population108
## "0.0884%"
## Population109
## "0.0857%"
## Population110
## "0.0848%"
## Population111
## "0.0828%"
## Population112
## "0.0821%"
## Population113
## "0.0812%"
## Population114
## "0.0801%"
## Population115
## "0.0744%"
## Population116
## "0.0739%"
## Population117
## "0.0702%"
## Population118
## "0.0690%"
## Population119
## "0.0684%"
## Population120
## "0.0684%"
## Population121
## "0.0683%"
## Population122
## "0.0679%"
## Population123
## "0.0676%"
## Population124
## "0.0649%"
## Population125
## "0.0643%"
## Population126
## "0.0638%"
## Population127
## "0.0624%"
## Population128
## "0.0582%"
## Population129
## "0.0580%"
## Population130
## "0.0545%"
## Population131
## "0.0533%"
## Population132
## "0.0482%"
## Population133
## "0.0459%"
## Population134
## "0.0459%"
## Population135
## "0.0443%"
## Population136
## "0.0435%"
## Population137
## "0.0414%"
## Population138
## "0.0409%"
## Population139
## "0.0371%"
## Population140
## "0.0356%"
## Population141
## "0.0349%"
## Population142
## "0.0348%"
## Population143
## "0.0340%"
## Population144
## "0.0337%"
## Population145
## "0.0323%"
## Population146
## "0.0318%"
## Population147
## "0.0300%"
## Population148
## "0.0287%"
## Population149
## "0.0278%"
## Population150
## "0.0264%"
## Population151
## "0.0235%"
## Population152
## "0.0228%"
## Population153
## "0.0224%"
## Population154
## "0.0205%"
## Population155
## "0.0188%"
## Population156
## "0.0187%"
## Population157
## "0.0170%"
## Population158
## "0.0169%"
## Population159
## "0.0166%"
## Population160
## "0.0157%"
## Population161
## "0.0150%"
## Population162
## "0.0125%"
## Population163
## "0.0114%"
## Population164
## "0.0111%"
## Population165
## "0.00951%"
## Population166
## "0.00944%"
## Population167
## "0.00926%"
## Population168
## "0.00907%"
## Population169
## "0.00838%"
## Population170
## "0.00823%"
## Population171
## "0.00769%"
## Population172
## "0.00768%"
## Population173
## "0.00717%"
## Population174
## "0.00709%"
## Population175
## "0.00647%"
## Population176
## "0.00550%"
## Population177
## "0.00549%"
## Population178
## "0.00642%"
## Population179
## "0.00497%"
## Population180
## "0.00487%"
## Population181
## "0.00477%"
## Population182
## "0.00450%"
## Population183
## "0.00375%"
## Population184
## "0.00351%"
## Population185
## "0.00349%"
## Population186
## "0.00341%"
## Population187
## "0.00306%"
## Population188
## "0.00267%"
## Population189
## "0.00256%"
## Population190
## "0.00223%"
## Population191
## "0.00192%"
## Population192
## "0.00185%"
## Population193
## "0.00185%"
## Population194
## "0.00156%"
## Population195
## "0.00150%"
## Population196
## "0.00138%"
## Population197
## "0.00134%"
## Population198
## "0.00133%"
## Population199
## "0.00132%"
## Population200
## "0.00126%"
## Population201
## "0.00125%"
## Population202
## "0.00125%"
## Population203
## "0.00109%"
## Population204
## "0.00105%"
## Population205
## "0.00102%"
## Population206
## "0.000909%"
## Population207
## "0.000886%"
## Population208
## "0.000798%"
## Population209
## "0.000793%"
## Population210
## "0.000705%"
## Population211
## "0.000676%"
## Population212
## "0.000704%"
## Population213
## "0.000619%"
## Population214
## "0.000598%"
## Population215
## "0.000589%"
## Population216
## "0.000575%"
## Population217
## "0.000530%"
## Population218
## "0.000494%"
## Population219
## "0.000489%"
## Population220
## "0.000488%"
## Population221
## "0.000421%"
## Population222
## "0.000411%"
## Population223
## "0.000403%"
## Population224
## "0.000386%"
## Population225
## "0.000379%"
## Population226
## "0.000208%"
## Population227
## "0.000196%"
## Population228
## "0.000187%"
## Population229
## "0.000147%"
## Population230
## "0.000142%"
## Population231
## "0.000133%"
## Population232
## "0.000132%"
## Population233
## "0%"
## Population234
## "0%"
## Population235
## "0%"
## Population236
## "0%"
## Population237
## "0%"
## Population238
## "0%"
## Population239
## "0%"
## Population240
## "0%"
## Population241
## "0%"
## Population242
## "0%"
## Population243
## "0%"
## Date1
## "Date"
## Date2
## "9 May 2023"
## Date3
## "31 Dec 2022"
## Date4
## "1 Mar 2023"
## Date5
## "9 May 2023"
## Date6
## "31 Dec 2022"
## Date7
## "30 Apr 2023"
## Date8
## "1 Jul 2022"
## Date9
## "9 May 2023"
## Date10
## "15 Jun 2022"
## Date11
## "1 Jan 2023"
## Date12
## "30 Sep 2022"
## Date13
## "1 Apr 2023"
## Date14
## "3 May 2023"
## Date15
## "1 Jul 2022"
## Date16
## "9 May 2023"
## Date17
## "Dec 2022"
## Date18
## "1 Jul 2022"
## Date19
## "9 May 2023"
## Date20
## "31 Dec 2022"
## Date21
## "30 Sep 2022"
## Date22
## "1 Jan 2023"
## Date23
## "30 Jun 2021"
## Date24
## "9 May 2023"
## Date25
## "23 Aug 2022"
## Date26
## "1 Jul 2022"
## Date27
## "28 Feb 2023"
## Date28
## "1 Jul 2022"
## Date29
## "30 Jun 2023"
## Date30
## "31 Dec 2022"
## Date31
## "1 Jul 2022"
## Date32
## "31 Aug 2019"
## Date33
## "18 May 2022"
## Date34
## "1 Jan 2022"
## Date35
## "9 May 2023"
## Date36
## "1 Jul 2021"
## Date37
## "1 Jul 2021"
## Date38
## "1 Feb 2022"
## Date39
## "9 May 2023"
## Date40
## "28 Feb 2023"
## Date41
## "9 May 2023"
## Date42
## "9 May 2023"
## Date43
## "1 Jul 2021"
## Date44
## "1 Jul 2022"
## Date45
## "1 Jul 2022"
## Date46
## "30 Jun 2022"
## Date47
## "9 May 2023"
## Date48
## "1 Jul 2020"
## Date49
## "1 Jul 2022"
## Date50
## "27 Jun 2021"
## Date51
## "14 Dec 2021"
## Date52
## "25 Nov 2021"
## Date53
## "1 Jul 2022"
## Date54
## "1 Jul 2021"
## Date55
## "9 May 2023"
## Date56
## "1 Jul 2021"
## Date57
## "1 Jul 2019"
## Date58
## "1 Jul 2021"
## Date59
## "31 Mar 2023"
## Date60
## "1 Jul 2022"
## Date61
## "1 Jul 2022"
## Date62
## "1 Jul 2022"
## Date63
## "1 Jul 2021"
## Date64
## "1 Jul 2022"
## Date65
## "30 Jun 2023"
## Date66
## "9 May 2023"
## Date67
## "14 Sep 2022"
## Date68
## "17 Jul 2022"
## Date69
## "9 May 2023"
## Date70
## "9 May 2023"
## Date71
## "1 Jul 2021"
## Date72
## "1 Jul 2021"
## Date73
## "1 Jul 2021"
## Date74
## "1 Jul 2021"
## Date75
## "3 Mar 2019"
## Date76
## "20 Apr 2022"
## Date77
## "1 Jul 2020"
## Date78
## "15 Aug 2022"
## Date79
## "1 Jul 2021"
## Date80
## "1 Jul 2021"
## Date81
## "1 Jul 2021"
## Date82
## "1 Jul 2022"
## Date83
## "1 Jan 2022"
## Date84
## "1 Mar 2023"
## Date85
## "1 Jul 2020"
## Date86
## "9 May 2023"
## Date87
## "31 Dec 2021"
## Date88
## "1 Jul 2021"
## Date89
## "30 Sep 2022"
## Date90
## "28 Feb 2023"
## Date91
## "23 Nov 2021"
## Date92
## "31 Dec 2021"
## Date93
## "1 Mar 2023"
## Date94
## "9 May 2023"
## Date95
## "1 Jan 2023"
## Date96
## "1 Jul 2021"
## Date97
## "1 Jan 2021"
## Date98
## "31 Dec 2020"
## Date99
## "1 Jan 2022"
## Date100
## "1 Jul 2021"
## Date101
## "1 Jan 2023"
## Date102
## "31 Dec 2022"
## Date103
## "1 Jul 2022"
## Date104
## "8 Nov 2022"
## Date105
## "1 Jul 2021"
## Date106
## "1 Jul 2021"
## Date107
## "31 Dec 2022"
## Date108
## "1 Mar 2023"
## Date109
## "1 Jul 2022"
## Date110
## "1 Jul 2022"
## Date111
## "31 Oct 2022"
## Date112
## "30 Jun 2020"
## Date113
## "7 Sep 2021"
## Date114
## "1 Jul 2021"
## Date115
## "1 Jul 2021"
## Date116
## "1 Jan 2023"
## Date117
## "1 Jul 2020"
## Date118
## "28 Feb 2023"
## Date119
## "1 Jul 2021"
## Date120
## "31 Dec 2022"
## Date121
## "1 Jan 2023"
## Date122
## "30 Jun 2022"
## Date123
## "31 Dec 2022"
## Date124
## "30 Jun 2022"
## Date125
## "9 May 2023"
## Date126
## "3 Apr 2022"
## Date127
## "31 Mar 2023"
## Date128
## "31 Dec 2020"
## Date129
## "1 Jul 2021"
## Date130
## "1 Jul 2022"
## Date131
## "1 Jul 2020"
## Date132
## "31 Aug 2021"
## Date133
## "1 Jan 2022"
## Date134
## "1 Jul 2021"
## Date135
## "30 Jun 2021"
## Date136
## "9 May 2023"
## Date137
## "1 Jul 2020"
## Date138
## "1 Apr 2020"
## Date139
## "1 Jan 2022"
## Date140
## "1 Apr 2023"
## Date141
## "31 Jul 2019"
## Date142
## "1 Jan 2022"
## Date143
## "1 Jul 2018"
## Date144
## "1 Jul 2021"
## Date145
## "1 Jan 2021"
## Date146
## "1 Jul 2021"
## Date147
## "1 Jul 2021"
## Date148
## "1 Jul 2021"
## Date149
## "1 Jul 2021"
## Date150
## "1 Jan 2023"
## Date151
## "1 Mar 2023"
## Date152
## "1 Nov 2021"
## Date153
## "31 Dec 2020"
## Date154
## "1 Jul 2021"
## Date155
## "1 Jul 2021"
## Date156
## "17 Mar 2020"
## Date157
## "30 Jun 2022"
## Date158
## "1 Jan 2023"
## Date159
## "1 Jul 2022"
## Date160
## "31 Dec 2022"
## Date161
## "1 Jul 2021"
## Date162
## "1 Jul 2022"
## Date163
## "1 Oct 2021"
## Date164
## "1 Jul 2021"
## Date165
## "30 May 2022"
## Date166
## "15 Dec 2017"
## Date167
## "1 Jul 2019"
## Date168
## "1 Jul 2021"
## Date169
## "31 Dec 2022"
## Date170
## "1 Jan 2023"
## Date171
## "1 Jan 2022"
## Date172
## "1 Jul 2021"
## Date173
## "1 Jul 2021"
## Date174
## "1 Jul 2022"
## Date175
## "21 Nov 2021"
## Date176
## "1 Jul 2022"
## Date177
## "1 Jul 2021"
## Date178
## "13 Sep 2022"
## Date179
## "4 Apr 2022"
## Date180
## "1 Apr 2023"
## Date181
## "31 Dec 2020"
## Date182
## "31 Dec 2022"
## Date183
## "1 Jul 2021"
## Date184
## "1 Jul 2021"
## Date185
## "1 Jul 2021"
## Date186
## "1 Jul 2021"
## Date187
## "1 Jan 2020"
## Date188
## "1 Jul 2021"
## Date189
## "6 Nov 2021"
## Date190
## "1 Jul 2018"
## Date191
## "1 Apr 2020"
## Date192
## "1 Jan 2023"
## Date193
## "1 Oct 2019"
## Date194
## "1 Jul 2021"
## Date195
## "1 Jul 2021"
## Date196
## "1 Jul 2020"
## Date197
## "31 Dec 2019"
## Date198
## "30 Sep 2023"
## Date199
## "1 Jul 2021"
## Date200
## "1 Jan 2022"
## Date201
## "22 Apr 2022"
## Date202
## "1 Jan 2022"
## Date203
## "1 Apr 2020"
## Date204
## "30 May 2021"
## Date205
## "31 Mar 2023"
## Date206
## "1 Jul 2021"
## Date207
## "30 Sep 2020"
## Date208
## "1 Jul 2021"
## Date209
## "31 Mar 2022"
## Date210
## "1 Jan 2023"
## Date211
## "1 Mar 2023"
## Date212
## "31 Dec 2021"
## Date213
## "1 Apr 2020"
## Date214
## "1 Jul 2021"
## Date215
## "1 Apr 2020"
## Date216
## "1 Jul 2021"
## Date217
## "1 Jan 2021"
## Date218
## "31 Dec 2022"
## Date219
## "1 Jul 2021"
## Date220
## "31 Dec 2021"
## Date221
## "28 Feb 2023"
## Date222
## "1 Jul 2021"
## Date223
## "1 Jan 2020"
## Date224
## "1 Jul 2021"
## Date225
## "28 Feb 2023"
## Date226
## "1 Jul 2021"
## Date227
## "31 Dec 2021"
## Date228
## "1 Jul 2021"
## Date229
## "1 Jul 2021"
## Date230
## "1 Jan 2021"
## Date231
## "1 Jul 2021"
## Date232
## "1 Jan 2020"
## Date233
## "1 Jan 2020"
## Date234
## "1 Jul 2021"
## Date235
## "1 Jul 2021"
## Date236
## "1 Jul 2021"
## Date237
## "1 Jan 2021"
## Date238
## "1 Jan 2021"
## Date239
## "1 Jan 2019"
## Date240
## "1 Jul 2021"
## Date241
## "1 Feb 2019"
## Date242
## "30 Jun 2020"
## Date243
## "1 Jul 2021"
## Source (official or from the United Nations)1
## "Source (official or from the United Nations)"
## Source (official or from the United Nations)2
## "UN projection[3]"
## Source (official or from the United Nations)3
## "Official estimate[4]"
## Source (official or from the United Nations)4
## "Official projection[5]"
## Source (official or from the United Nations)5
## "National population clock[7]"
## Source (official or from the United Nations)6
## "Official estimate[8]"
## Source (official or from the United Nations)7
## "UN projection[3]"
## Source (official or from the United Nations)8
## "UN projection[3]"
## Source (official or from the United Nations)9
## "National population clock[9]"
## Source (official or from the United Nations)10
## "2022 final census result[10]"
## Source (official or from the United Nations)11
## "Official estimate[11]"
## Source (official or from the United Nations)12
## "National quarterly estimate[12]"
## Source (official or from the United Nations)13
## "Official estimate[13]"
## Source (official or from the United Nations)14
## "National population clock[14][15]"
## Source (official or from the United Nations)15
## "National annual projection[16]"
## Source (official or from the United Nations)16
## "National population clock[17]"
## Source (official or from the United Nations)17
## "Official estimate[18]"
## Source (official or from the United Nations)18
## "UN projection[3]"
## Source (official or from the United Nations)19
## "National population clock[19]"
## Source (official or from the United Nations)20
## "Official estimate[20]"
## Source (official or from the United Nations)21
## "National quarterly estimate[21]"
## Source (official or from the United Nations)22
## "Official estimate[22]"
## Source (official or from the United Nations)23
## "Official estimate[23]"
## Source (official or from the United Nations)24
## "National population clock[24]"
## Source (official or from the United Nations)25
## "Census results[25]"
## Source (official or from the United Nations)26
## "Official estimate[26]"
## Source (official or from the United Nations)27
## "Monthly national estimate[27]"
## Source (official or from the United Nations)28
## "National annual projection[28]"
## Source (official or from the United Nations)29
## "Official projection[29]"
## Source (official or from the United Nations)30
## "Official estimate[30]"
## Source (official or from the United Nations)31
## "Official estimate[31]"
## Source (official or from the United Nations)32
## "2019 census result[32]"
## Source (official or from the United Nations)33
## "2022 census preliminary result[33]"
## Source (official or from the United Nations)34
## "Official estimate[34]"
## Source (official or from the United Nations)35
## "National population clock[35]"
## Source (official or from the United Nations)36
## "Official projection[36]"
## Source (official or from the United Nations)37
## "Official estimate[37]"
## Source (official or from the United Nations)38
## "National monthly estimate[38]"
## Source (official or from the United Nations)39
## "National population clock[39]"
## Source (official or from the United Nations)40
## "National monthly estimate[40]"
## Source (official or from the United Nations)41
## "National population clock[41]"
## Source (official or from the United Nations)42
## "National population clock[42]"
## Source (official or from the United Nations)43
## "Official estimate[43]"
## Source (official or from the United Nations)44
## "UN projection[3]"
## Source (official or from the United Nations)45
## "National annual projection[44]"
## Source (official or from the United Nations)46
## "National annual projection[45]"
## Source (official or from the United Nations)47
## "National population clock[46]"
## Source (official or from the United Nations)48
## "Official estimate[47]"
## Source (official or from the United Nations)49
## "National annual projection[48]"
## Source (official or from the United Nations)50
## "2021 census results[49]"
## Source (official or from the United Nations)51
## "2021 census result[50]"
## Source (official or from the United Nations)52
## "2021 final census result[51]"
## Source (official or from the United Nations)53
## "UN projection[3]"
## Source (official or from the United Nations)54
## "National annual projection[52]"
## Source (official or from the United Nations)55
## "National population clock[53]"
## Source (official or from the United Nations)56
## "National annual projection[54]"
## Source (official or from the United Nations)57
## "National annual projection[55]"
## Source (official or from the United Nations)58
## "National annual projection[56]"
## Source (official or from the United Nations)59
## "Official estimate[57]"
## Source (official or from the United Nations)60
## "UN projection[3]"
## Source (official or from the United Nations)61
## "National projection[58]"
## Source (official or from the United Nations)62
## "Official estimate[59]"
## Source (official or from the United Nations)63
## "UN projection[3]"
## Source (official or from the United Nations)64
## "National annual projection[60]"
## Source (official or from the United Nations)65
## "National annual projection[61]"
## Source (official or from the United Nations)66
## "National population clock[62]"
## Source (official or from the United Nations)67
## "2022 Zambian census[63]"
## Source (official or from the United Nations)68
## "2022 census preliminary result[64]"
## Source (official or from the United Nations)69
## "National population clock[65]"
## Source (official or from the United Nations)70
## "National population clock[66]"
## Source (official or from the United Nations)71
## "UN projection[3]"
## Source (official or from the United Nations)72
## "National annual projection[67]"
## Source (official or from the United Nations)73
## "National annual projection[68]"
## Source (official or from the United Nations)74
## "National annual projection[69]"
## Source (official or from the United Nations)75
## "2019 census result[70]"
## Source (official or from the United Nations)76
## "2022 preliminary census result[71]"
## Source (official or from the United Nations)77
## "National annual projection[72]"
## Source (official or from the United Nations)78
## "2022 census result[73]"
## Source (official or from the United Nations)79
## "National annual projection[74]"
## Source (official or from the United Nations)80
## "National annual projection[75]"
## Source (official or from the United Nations)81
## "National annual projection[76]"
## Source (official or from the United Nations)82
## "National annual projection[77]"
## Source (official or from the United Nations)83
## "National semi-annual estimate[78]"
## Source (official or from the United Nations)84
## "Official estimate[79]"
## Source (official or from the United Nations)85
## "National annual projection[80]"
## Source (official or from the United Nations)86
## "National population clock[81]"
## Source (official or from the United Nations)87
## "Official estimate[82]"
## Source (official or from the United Nations)88
## "National annual projection[83]"
## Source (official or from the United Nations)89
## "2022 estimate[84]"
## Source (official or from the United Nations)90
## "Monthly national estimate[85]"
## Source (official or from the United Nations)91
## "2021 census preliminary results[86]"
## Source (official or from the United Nations)92
## "2021 estimate[87]"
## Source (official or from the United Nations)93
## "Monthly national estimate[88]"
## Source (official or from the United Nations)94
## "National population clock[89]"
## Source (official or from the United Nations)95
## "Official estimate[90]"
## Source (official or from the United Nations)96
## "National annual projection[91]"
## Source (official or from the United Nations)97
## "Official estimate[92]"
## Source (official or from the United Nations)98
## "Official estimate[93]|"
## Source (official or from the United Nations)99
## "Official estimate[94]"
## Source (official or from the United Nations)100
## "National annual projection[95]"
## Source (official or from the United Nations)101
## "National quarterly estimate[96]"
## Source (official or from the United Nations)102
## "National quarterly estimate[97]"
## Source (official or from the United Nations)103
## "National annual projection[98]"
## Source (official or from the United Nations)104
## "Final 2022 census result[99]"
## Source (official or from the United Nations)105
## "National annual projection[100]"
## Source (official or from the United Nations)106
## "National annual projection[101]"
## Source (official or from the United Nations)107
## "National semi-annual estimate[102]"
## Source (official or from the United Nations)108
## "Monthly national estimate[103]"
## Source (official or from the United Nations)109
## "National annual projection[104]"
## Source (official or from the United Nations)110
## "UN projection[3]"
## Source (official or from the United Nations)111
## "2022 census final results[105]"
## Source (official or from the United Nations)112
## "Official estimate[106]"
## Source (official or from the United Nations)113
## "Census 2021[107]"
## Source (official or from the United Nations)114
## "UN projection[3]"
## Source (official or from the United Nations)115
## "UN projection[3]"
## Source (official or from the United Nations)116
## "National quarterly estimate[108]"
## Source (official or from the United Nations)117
## "National annual projection[109]"
## Source (official or from the United Nations)118
## "Monthly national estimate[110]"
## Source (official or from the United Nations)119
## "UN projection[3]"
## Source (official or from the United Nations)120
## "National quarterly estimate[111]"
## Source (official or from the United Nations)121
## "National annual projection[112]"
## Source (official or from the United Nations)122
## "Official estimate[113]"
## Source (official or from the United Nations)123
## "National quarterly estimate[114]"
## Source (official or from the United Nations)124
## "National annual projection[115]"
## Source (official or from the United Nations)125
## "National population clock[116]"
## Source (official or from the United Nations)126
## "2022 census preliminary results[117]"
## Source (official or from the United Nations)127
## "Monthly national estimate[118]"
## Source (official or from the United Nations)128
## "Official estimate[119]"
## Source (official or from the United Nations)129
## "National annual projection[120]"
## Source (official or from the United Nations)130
## "National annual projection[121]"
## Source (official or from the United Nations)131
## "National annual projection[122]"
## Source (official or from the United Nations)132
## "2021 census[123]"
## Source (official or from the United Nations)133
## "Official estimate[124]"
## Source (official or from the United Nations)134
## "UN projection[3]"
## Source (official or from the United Nations)135
## "National annual projection[125]"
## Source (official or from the United Nations)136
## "National population clock[126]"
## Source (official or from the United Nations)137
## "Official estimate[127][128]"
## Source (official or from the United Nations)138
## "2020 census result[129]"
## Source (official or from the United Nations)139
## "National quarterly estimate[130]"
## Source (official or from the United Nations)140
## "Monthly national estimate[131]"
## Source (official or from the United Nations)141
## "Official estimate[132]"
## Source (official or from the United Nations)142
## "Official estimate[133]"
## Source (official or from the United Nations)143
## "National projection[134]"
## Source (official or from the United Nations)144
## "UN projection[3]"
## Source (official or from the United Nations)145
## "Official estimate[135]"
## Source (official or from the United Nations)146
## "National annual projection[136]"
## Source (official or from the United Nations)147
## "National annual projection[137]"
## Source (official or from the United Nations)148
## "UN projection[3]"
## Source (official or from the United Nations)149
## "National annual projection[138]"
## Source (official or from the United Nations)150
## "National quarterly estimate[139]"
## Source (official or from the United Nations)151
## "Monthly national estimate[140]"
## Source (official or from the United Nations)152
## "2021 census result[141]"
## Source (official or from the United Nations)153
## "Official estimate[142]"
## Source (official or from the United Nations)154
## "National annual projection[143]"
## Source (official or from the United Nations)155
## "Official estimate[144]"
## Source (official or from the United Nations)156
## "2020 census result[145]"
## Source (official or from the United Nations)157
## "Official estimate[146]"
## Source (official or from the United Nations)158
## "Official estimate[147]"
## Source (official or from the United Nations)159
## "National annual projection[148]"
## Source (official or from the United Nations)160
## "National semi-annual estimate[149]"
## Source (official or from the United Nations)161
## "UN projection[3]"
## Source (official or from the United Nations)162
## "National projection [150]"
## Source (official or from the United Nations)163
## "2021 census preliminary results[151]"
## Source (official or from the United Nations)164
## "National annual projection[152]"
## Source (official or from the United Nations)165
## "National annual projection[153]"
## Source (official or from the United Nations)166
## "2017 census result[154]"
## Source (official or from the United Nations)167
## "Official estimate[155]"
## Source (official or from the United Nations)168
## "National annual projection[95]"
## Source (official or from the United Nations)169
## "National quarterly estimate[156]"
## Source (official or from the United Nations)170
## "Official estimate[157]"
## Source (official or from the United Nations)171
## "National annual estimate[158]"
## Source (official or from the United Nations)172
## "Official estimate[159]"
## Source (official or from the United Nations)173
## "UN projection[3]"
## Source (official or from the United Nations)174
## "National annual projection[160]"
## Source (official or from the United Nations)175
## "Census 2021[161]"
## Source (official or from the United Nations)176
## "Official estimate[162]"
## Source (official or from the United Nations)177
## "Official estimate[163]"
## Source (official or from the United Nations)178
## "Provisional census results[164]"
## Source (official or from the United Nations)179
## "Preliminary 2022 Census Population Count| [165]"
## Source (official or from the United Nations)180
## "National quarterly estimate[166]"
## Source (official or from the United Nations)181
## "Official estimate[167]"
## Source (official or from the United Nations)182
## "Official estimate[168]"
## Source (official or from the United Nations)183
## "National annual projection[95]"
## Source (official or from the United Nations)184
## "UN projection[3]"
## Source (official or from the United Nations)185
## "National annual projection[95]"
## Source (official or from the United Nations)186
## "National annual projection[95]"
## Source (official or from the United Nations)187
## "Official estimate[169]"
## Source (official or from the United Nations)188
## "National annual projection[170]"
## Source (official or from the United Nations)189
## "Census 2021[171]"
## Source (official or from the United Nations)190
## "Official estimate[172]"
## Source (official or from the United Nations)191
## "2020 census result[173]"
## Source (official or from the United Nations)192
## "Official estimate[174]"
## Source (official or from the United Nations)193
## "Official estimate[175]"
## Source (official or from the United Nations)194
## "UN projection[3]"
## Source (official or from the United Nations)195
## "National annual projection[95]"
## Source (official or from the United Nations)196
## "Official estimate[176]"
## Source (official or from the United Nations)197
## "Official estimate[177]"
## Source (official or from the United Nations)198
## "National quarterly estimate[178]"
## Source (official or from the United Nations)199
## "National annual projection[95]"
## Source (official or from the United Nations)200
## "National annual estimate[179]"
## Source (official or from the United Nations)201
## "2022 Census[180]"
## Source (official or from the United Nations)202
## "National annual estimate[181]"
## Source (official or from the United Nations)203
## "2020 census result[182]"
## Source (official or from the United Nations)204
## "2021 Census results[183]"
## Source (official or from the United Nations)205
## "Official estimate[184]"
## Source (official or from the United Nations)206
## "UN projection[3]"
## Source (official or from the United Nations)207
## "2021 Census[185]"
## Source (official or from the United Nations)208
## "National annual projection[186]"
## Source (official or from the United Nations)209
## "National quarterly estimate[187]"
## Source (official or from the United Nations)210
## "National quarterly estimate[188]"
## Source (official or from the United Nations)211
## "Monthly national estimate[189]"
## Source (official or from the United Nations)212
## "Official estimate[190]"
## Source (official or from the United Nations)213
## "2020 census result[191]"
## Source (official or from the United Nations)214
## "UN projection[3]"
## Source (official or from the United Nations)215
## "2020 census result[192]"
## Source (official or from the United Nations)216
## "Official estimate[193]"
## Source (official or from the United Nations)217
## "Official estimate[194]"
## Source (official or from the United Nations)218
## "National semi-annual estimate[195]"
## Source (official or from the United Nations)219
## "2021 Census[196]"
## Source (official or from the United Nations)220
## "Official estimate[197]"
## Source (official or from the United Nations)221
## "Monthly national estimate[198]"
## Source (official or from the United Nations)222
## "UN projection[3]"
## Source (official or from the United Nations)223
## "Official estimate[199]"
## Source (official or from the United Nations)224
## "UN projection[3]"
## Source (official or from the United Nations)225
## "Monthly national estimate[110]"
## Source (official or from the United Nations)226
## "2021 Census[200]"
## Source (official or from the United Nations)227
## "Official estimate[201]"
## Source (official or from the United Nations)228
## "2021 Census[202]"
## Source (official or from the United Nations)229
## "National annual projection[95]"
## Source (official or from the United Nations)230
## "National annual projection[95]"
## Source (official or from the United Nations)231
## "National annual projection[95]"
## Source (official or from the United Nations)232
## "Official estimate[199]"
## Source (official or from the United Nations)233
## "Official estimate[199]"
## Source (official or from the United Nations)234
## "2021 Census[203][204][205]"
## Source (official or from the United Nations)235
## "UN projection[3]"
## Source (official or from the United Nations)236
## "UN projection[3]"
## Source (official or from the United Nations)237
## "2021 Census[206]"
## Source (official or from the United Nations)238
## "2021 Census [207]"
## Source (official or from the United Nations)239
## "2019 Census [208]"
## Source (official or from the United Nations)240
## "National annual projection[95]"
## Source (official or from the United Nations)241
## "Monthly national estimate[209]"
## Source (official or from the United Nations)242
## "2021 Census[210]"
## Source (official or from the United Nations)243
## "Official estimate[211]"
## Notes1
## "Notes"
## Notes2
## ""
## Notes3
## "[b]"
## Notes4
## "[c]"
## Notes5
## "[d]"
## Notes6
## ""
## Notes7
## "[e]"
## Notes8
## ""
## Notes9
## ""
## Notes10
## ""
## Notes11
## "[f]"
## Notes12
## ""
## Notes13
## ""
## Notes14
## ""
## Notes15
## ""
## Notes16
## ""
## Notes17
## ""
## Notes18
## ""
## Notes19
## ""
## Notes20
## ""
## Notes21
## ""
## Notes22
## "[g]"
## Notes23
## "[h]"
## Notes24
## ""
## Notes25
## "[i]"
## Notes26
## ""
## Notes27
## ""
## Notes28
## ""
## Notes29
## ""
## Notes30
## ""
## Notes31
## ""
## Notes32
## ""
## Notes33
## ""
## Notes34
## ""
## Notes35
## ""
## Notes36
## ""
## Notes37
## ""
## Notes38
## "[j]"
## Notes39
## ""
## Notes40
## ""
## Notes41
## "[k]"
## Notes42
## ""
## Notes43
## ""
## Notes44
## ""
## Notes45
## ""
## Notes46
## ""
## Notes47
## ""
## Notes48
## ""
## Notes49
## ""
## Notes50
## ""
## Notes51
## ""
## Notes52
## ""
## Notes53
## ""
## Notes54
## ""
## Notes55
## "[l]"
## Notes56
## ""
## Notes57
## ""
## Notes58
## ""
## Notes59
## "[m]"
## Notes60
## ""
## Notes61
## ""
## Notes62
## ""
## Notes63
## ""
## Notes64
## ""
## Notes65
## ""
## Notes66
## ""
## Notes67
## ""
## Notes68
## ""
## Notes69
## ""
## Notes70
## "[n]"
## Notes71
## "[o]"
## Notes72
## ""
## Notes73
## ""
## Notes74
## ""
## Notes75
## ""
## Notes76
## ""
## Notes77
## ""
## Notes78
## NA
## Notes79
## ""
## Notes80
## ""
## Notes81
## ""
## Notes82
## ""
## Notes83
## ""
## Notes84
## ""
## Notes85
## ""
## Notes86
## ""
## Notes87
## ""
## Notes88
## ""
## Notes89
## ""
## Notes90
## ""
## Notes91
## ""
## Notes92
## ""
## Notes93
## ""
## Notes94
## "[p]"
## Notes95
## ""
## Notes96
## ""
## Notes97
## ""
## Notes98
## NA
## Notes99
## ""
## Notes100
## ""
## Notes101
## ""
## Notes102
## ""
## Notes103
## ""
## Notes104
## ""
## Notes105
## ""
## Notes106
## ""
## Notes107
## ""
## Notes108
## ""
## Notes109
## ""
## Notes110
## ""
## Notes111
## "[q]"
## Notes112
## ""
## Notes113
## ""
## Notes114
## ""
## Notes115
## ""
## Notes116
## "[r]"
## Notes117
## ""
## Notes118
## "[s]"
## Notes119
## ""
## Notes120
## "[t]"
## Notes121
## "[u]"
## Notes122
## ""
## Notes123
## ""
## Notes124
## ""
## Notes125
## "[v]"
## Notes126
## ""
## Notes127
## ""
## Notes128
## ""
## Notes129
## ""
## Notes130
## ""
## Notes131
## ""
## Notes132
## ""
## Notes133
## "[w]"
## Notes134
## ""
## Notes135
## ""
## Notes136
## ""
## Notes137
## ""
## Notes138
## ""
## Notes139
## ""
## Notes140
## ""
## Notes141
## ""
## Notes142
## ""
## Notes143
## ""
## Notes144
## ""
## Notes145
## "[x]"
## Notes146
## ""
## Notes147
## ""
## Notes148
## ""
## Notes149
## ""
## Notes150
## ""
## Notes151
## ""
## Notes152
## ""
## Notes153
## "[y]"
## Notes154
## ""
## Notes155
## ""
## Notes156
## ""
## Notes157
## ""
## Notes158
## ""
## Notes159
## ""
## Notes160
## ""
## Notes161
## ""
## Notes162
## ""
## Notes163
## "[z]"
## Notes164
## ""
## Notes165
## ""
## Notes166
## ""
## Notes167
## ""
## Notes168
## ""
## Notes169
## ""
## Notes170
## ""
## Notes171
## ""
## Notes172
## ""
## Notes173
## "[aa]"
## Notes174
## ""
## Notes175
## ""
## Notes176
## ""
## Notes177
## ""
## Notes178
## ""
## Notes179
## ""
## Notes180
## ""
## Notes181
## "[ab]"
## Notes182
## "[ac]"
## Notes183
## ""
## Notes184
## ""
## Notes185
## ""
## Notes186
## ""
## Notes187
## "[ad]"
## Notes188
## ""
## Notes189
## ""
## Notes190
## ""
## Notes191
## ""
## Notes192
## ""
## Notes193
## "[ae]"
## Notes194
## ""
## Notes195
## ""
## Notes196
## ""
## Notes197
## ""
## Notes198
## ""
## Notes199
## ""
## Notes200
## ""
## Notes201
## ""
## Notes202
## ""
## Notes203
## ""
## Notes204
## ""
## Notes205
## ""
## Notes206
## ""
## Notes207
## ""
## Notes208
## ""
## Notes209
## ""
## Notes210
## ""
## Notes211
## ""
## Notes212
## "[af]"
## Notes213
## ""
## Notes214
## ""
## Notes215
## ""
## Notes216
## ""
## Notes217
## ""
## Notes218
## ""
## Notes219
## ""
## Notes220
## ""
## Notes221
## ""
## Notes222
## ""
## Notes223
## ""
## Notes224
## ""
## Notes225
## ""
## Notes226
## ""
## Notes227
## ""
## Notes228
## ""
## Notes229
## ""
## Notes230
## ""
## Notes231
## ""
## Notes232
## ""
## Notes233
## ""
## Notes234
## ""
## Notes235
## ""
## Notes236
## ""
## Notes237
## ""
## Notes238
## ""
## Notes239
## ""
## Notes240
## ""
## Notes241
## "[ag]"
## Notes242
## ""
## Notes243
## ""
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics1
## "Global"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics2
## "Continents/subregions"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics3
## "Intercontinental"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics4
## "Cities/urban areas"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics5
## "Past and future"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics6
## "Population density"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics7
## "Growth indicators"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics8
## "Life expectancy"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics9
## "Other demographics"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics10
## "Health"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics11
## "Education and innovation"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics12
## "Economic"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics13
## "List of international rankings\nLists by country"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics1
## "Current population\nUnited Nations\nDemographics of the world"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics2
## "Africa\nAntarctica\nAsia\nEurope\nNorth America\nCaribbean\nOceania\nSouth America"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics3
## "Americas\nArab world\nCommonwealth of Nations\nEurasia\nEuropean Union\nIslands\nLatin America\nMiddle East"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics4
## "World cities\nNational capitals\nMegacities\nMegalopolises"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics5
## "Past and future population\nWorld population estimates\n1\n1000\n1500\n1600\n1700\n1800\n1900\n1939\n1989\n2000\n2005\n2010\n2015\nPopulation milestones"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics6
## "Current density\nPast and future population density\nCurrent real density based on food growing capacity"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics7
## "Population growth rate\nNatural increase\nNet reproduction rate\nNumber of births\nNumber of deaths\nBirth rate\nMortality rate\nFertility rate\nPast fertility rate"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics8
## "world\nAfrica\nAsia\nEurope\nNorth America\nSouth America\nworld regions\npast life expectancy"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics9
## "Age at childbearing\nAge at first marriage\nAge structure\nDependency ratio\nDivorce rate\nEthnic and cultural diversity level\nImmigrant population\nLinguistic diversity\nMedian age\nNet migration rate\nNumber of households\nReligion / Irreligion\nSex ratio\nUrban population\nUrbanization"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics10
## "Antidepressant consumption\nAntiviral medications for pandemic influenza\nHIV/AIDS adult prevalence rate\nInfant and under-five mortality rates\nMaternal mortality rate\nObesity rate\nPercentage suffering from undernourishment\nHealth expenditure by country by type of financing\nSuicide rate\nTotal health expenditure per capita\nTotal healthcare spending as % of GDP\nBody mass index (BMI)"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics11
## "Bloomberg Innovation Index\nEducation Index\nInternational Innovation Index\nLiteracy rate\nProgramme for International Student Assessment (PISA)\nProgramme for the International Assessment of Adult Competencies\nProgress in International Reading Literacy Study (PIRLS)\nStudent skills\nTertiary education attainment\nTrends in International Mathematics and Science Study (TIMSS)\nWorld Intellectual Property Indicators"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics12
## "Access to financial services\nDevelopment aid donors\nOfficial Development Assistance received\nEmployment rate\nIrrigated land area\nHuman Development Index\nby country\ninequality-adjusted\nplanetary pressures–adjusted HDI\nHuman Poverty Index\nImports\nExports\nIncome equality\nLabour force\nShare of income of top 1%\nNumber of millionaires (US dollars)\nNumber of billionaires (US dollars)\nPercentage living in poverty\nPublic sector\nUnemployment rate\nWealth inequality"
## .mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}vteLists of countries by population statistics13
## "List of international rankings\nLists by country"
table2 <- as.data.frame(tables[[2]])
head(table2, 2)
to apply to every chunk in the file
inside the chunk write
knitr::opts_chunk$set(include= ,echo = , message= , warning= )
# knitr::opts_chunk$set(message = TRUE, echo = TRUE, warning = TRUE)
include: to show or hide code and results from
appearing
echo: to show or hide code in the output but shows
result
message to hide or show the messages generated by the
code
warning: to show or hide warning generated by the code
these options can be written for individual chunks as well
## [1] 5
1 # heading 1
2 ## heading 2 3 ### heading 3
italics
italic
bold
bold
plot() to show r code/function
@Saneesh
this is a blockquote
— Saneesh
hello
# [mathematical
# notations](https://rpruim.github.io/s341/S19/from-class/MathinRmd.html)
\(by\) $by$
\(\mu\) $\mu$
\(\sum\) $\sum$
\(a\pm b\) $a\pm b$
\(x=y\) $x=y$
\(x>y\) $x>y$
\(x^2\) $x^2$
\(x\le y\) $x\le y$
\(\sum_{n=1}^{10} n^2\)
$\sum_{n=1}^{10} n^2$
\(LUI_i=\frac12(gi/gm)+\frac12(ti/tm)\)
$LUI_i=\frac12(gi/gm)+\frac12(ti/tm)$ \(x_{1}+ x_{2}+\cdots+x_{n}\)
$x_{1}+ x_{2}+\cdots+x_{n}$
\(|A|\) $|A|$
\(A\subset B\)
$A\subset B$
\(A \subseteq B\)
$A \subseteq B$
\(A \cup B\)
$A \cup B$
\(A \cap B\)
$A \cap B$
\(P(A|B)\) $P(A|B)$
\(\alpha\) $\alpha$
\(\beta\) $\beta$
\(\gamma\) $\gamma$
\(\theta\) $\theta$
\(H_2O\) $H_2O$
write
Inside a chunk after three … r,
echo=FALSE,out.width="70%",fig.align="center",fig.cap='write'
close the curly bracket, then write knitr::include_graphics(“Idly.jpg”)
# keep the image in the project folder, then close the chunk. with
‘```’
Idly
write an exclamation mark !, then square brackets
[caption] write caption in it, the normal brackets
(Idly.jpg) write the name of the file and it’s extension
i.e., idly.jpg